← Research

APIsec Labs · Excerpt · Original article: 9 min read

Hijacking Google ADK Using Malicious A2A Peers

A remote A2A peer in Google's Agent Development Kit can forge the framework's own control-plane object, EventActions, and use it to redirect execution to higher-privileged sibling agents, rewrite session state, and rewind the conversation history the model relies on for safety instructions. No signature or origin check sits between a peer's metadata and framework state.

Multi-agent systems are starting to look a lot like distributed systems with personalities, tools, and very different privilege levels. In Google ADK, we found that a remote A2A peer could supply forged control metadata that influences agent routing, session state, and even conversation history, creating a path for a fresh sort of privilege escalation. As AI agents gain more autonomy and access to real tools, how much trust should a framework place in control instructions that arrive from another agent?

Google's Agent Development Kit, or ADK, allows remote agents to participate in multi-agent applications through the Agent-to-Agent protocol. That federation model creates an important trust boundary where a remote peer may belong to another service, team, or organization, while the local ADK application can contain agents with considerably more powerful tools.

Naturally, we at apisec Labs had to go hunting. We found that a remote A2A peer can place ADK control data inside its own response metadata. ADK parses that data into an EventActions object and subsequently treats the resulting object as legitimate framework control state. There is no cryptographic signature or equivalent provenance check in the path examined.

In practical testing, this allowed a malicious peer to influence which agent executed next, modify session state, and alter which earlier conversation events remained visible to downstream processing. We reported the issue to Google VRP on August 8, 2026. It was closed as a duplicate the same day (respect to the speedrunner).

Our testing confirmed the behavior on google-adk 2.6.2, with the relevant mechanism present in earlier 2.5.x and 2.6.x code paths examined during analysis.

Google's Agent Development Kit 101

Google ADK is a framework for constructing agentic applications in which multiple agents can cooperate, delegate work, invoke tools, and maintain conversational state. A typical deployment might contain something like a root orchestrator plus specialized sub-agents. One agent handles retrieval, another performs analysis, another may have access to administrative APIs. The framework maintains session state and event history while deciding which agent should act next.

Now the juicy part. For our vulnerability particularly, the interesting object is EventActions.

EventActions carries control information associated with an ADK event. Among its fields are:

transfer_to_agent, which can influence which agent receives control next;

state_delta, which contains changes to session state;

rewind_before_invocation_id, which influences which prior events survive a rewind operation.

These are powerful primitives. They affect control flow, persistent state, and conversational history.

Put differently, EventActions is the group-chat admin of the framework. Giving somebody control of it changes the vibe rather quickly.

A2A creates a real trust boundary

ADK supports RemoteA2aAgent, allowing an agent hosted somewhere else on the network to participate in the local agent hierarchy through the A2A protocol.

That remote peer may run on another server, be operated by another team, or belong to another organization. This is precisely why the protocol boundary matters. Consider a plausible federation:

root_agent
├── reader_agent <- remote A2A peer
├── analyst_agent
└── admin_agent <- privileged local tools

reader_agent might only retrieve information. admin_agent, meanwhile, could call administrative functions, modify records, or trigger operational workflows. Nothing unusual there, multi-agent architectures are explicitly designed around agents with different capabilities.

Trust Forgery, and our Findings

The trust boundary crossing

model_validate() can answer questions such as: does this object conform to the EventActions schema? Are these fields valid? Can the data be parsed into the expected model? But it cannot establish who created the control object.

An ADK-generated EventActions structure and an identically shaped structure supplied by a remote peer can become indistinguishable once they enter this path. A related merge path in _merge_event_actions() exhibits the same provenance problem.

JSON, bless it, has never been known for strong opinions about identity.

Session state often feeds later agent decisions. A modification does not have to produce an immediately dramatic effect. Quietly changing a flag, identifier, workflow status, or routing variable can be enough to influence subsequent behavior (some of the most useful attacks in agentic systems could possibly be boring dictionaries).

Some agent safeguards frequently depend upon prior instructions remaining present in context, you know the rest.

We used differential tests in our proof-of-concept to separate the vulnerability from unrelated agent behavior, for all 3 findings above. The control and attack cases used the same agent hierarchy and execution environment.

Who should care?

The security-relevant configuration is an ADK application that combines a RemoteA2aAgent with sibling agents possessing greater capabilities.

That configuration is hardly exotic. It is one of the natural ways to build federated multi-agent systems. The malicious actor does not need direct access to the ADK application's host or credentials. A remote service already trusted to participate as an A2A peer can supply the relevant metadata. The privilege differential between agents provides the interesting part of the attack surface. A relatively constrained network peer can potentially influence framework control objects that reach components with broader local authority.

As agent ecosystems become more federated, we feel the need to emphasize that "connected agent" cannot quietly become synonymous with "trusted framework component."

Responsible Disclosure note

As stated in the intro, a super cool researcher had already submitted the underlying issue before us. Under standard vulnerability-reward programme rules, duplicate reports generally receive neither a bounty nor first-reporter credit. Google was informed ahead of publication, in the recommended way, and they permitted us to publish an article on our findings.

The bigger lesson: schemas need passports

All three behaviors trace back to essentially the same design issue. EventActions is a validatable data type, but the security-sensitive distinction between framework-issued actions and externally supplied actions is not encoded strongly enough at this boundary.

Agent frameworks routinely pass rich structured objects between models, tools, runtimes, remote peers, workflow engines, and orchestration layers. Once those objects begin carrying control-plane semantics, schema correctness alone cannot carry the security burden.

Control objects crossing network or privilege boundaries need provenance. Depending on the architecture, that may involve authenticated issuers, cryptographic integrity protection, capability restrictions, explicit allow-lists, trust-scoped action types, or reconstruction of sensitive control state on the trusted side of the boundary. Your pydantic can tell you that the steering wheel is shaped like a steering wheel, but somebody still needs to check who is holding it.

We built AI-Surface, our free OSS scanner, for exactly this moment, the one where a team discovers, after the fact, that a RemoteA2aAgent had been sitting in the hierarchy all along, wired straight to something like admin_agent with nobody having mapped that edge first. It will tell you the agent, and the connection, existed before your friendly neighborhood hacker's metadata does.

For every application you run

Find what's deployed and prove which exploits are real.

Go to apisec.ai