Pull request #30420, "fix(a2a-server): enforce bearer token authentication and request input validation," was merged into Gemini CLI on November 23, 2026 at 22:13 UTC. It is the last item in the v0.72.0-preview.0 notes, published November 24 at 00:34 UTC. The A2A server is the package that exposes the coding agent to other agents over the Agent2Agent protocol.
What the server had before
The diff removes a user builder that checked two literal values: a bearer token compared with 'valid-token' and Basic credentials compared with 'admin:password'. Anything else produced an UnauthenticatedUser. The PR describes these as "placeholder auth checks." It does not say whether routes served unauthenticated requests before the change, and this digest did not test the old build. GitHub lists no security advisory for the repository.
What the fix enforces
- A required secret. The token comes from
GEMINI_IPC_SECRET, orCODER_AGENT_AUTH_TOKENwhen the first is unset. It is "compared withcrypto.timingSafeEqual." Requests without it get401, and "If no token is configured, every request receives500," so the server fails closed. - Loopback only. Requests "must use a loopback
Host" and a loopbackOriginwhen one is sent; other values get403. The checks run "before body parsing and before every route," including routes added by the A2A SDK. - Server-side trust. Task creation ignores the request's
isTrustedflag, so "workspace trust is evaluated from server-side configuration rather than from the request payload." - Confined restores.
restore"returns an error if the resolved path isn't inside" the checkpoint directory.
The PR flags a behaviour change: clients must send the token "on every request, including the agent card request."
Why the Host check matters for a local agent
Analysis: a server bound to localhost is still reachable from any web page the user opens, through the browser. DNS rebinding lets a hostile page point its own hostname at 127.0.0.1; the browser then sends requests to the local server with the attacker's hostname in Host. Rejecting non-loopback Host and Origin values blocks that path even before the token check. For an agent that can edit a workspace, a request-supplied trust flag and an unconfined restore path were the other two ways a caller could widen its own permissions.
Original exercise, not executed: Jenya starts the preview build of the A2A server for a Belgavi's Book Store help-desk agent with CODER_AGENT_AUTH_TOKEN set, then runs the PR's three curl checks for CASE-7402: with the token (expect 200), without it (401), and with Host: external.example.com (403). Repeat with no token configured and confirm every request returns 500.
Sources accessed November 24, 2026. Views are my own and do not represent any employer, past or present.
Sources and evidence
Gemini CLI's A2A server dropped hard-coded placeholder credentials for a required, timing-safe bearer token plus loopback Host and Origin checks. The fix is in v0.72.0-preview.0; stable v0.71.0 does not include it.