A2A Security: Why AI Agents Must Authenticate Each Other
When one AI agent gets a message from another, how does it know who sent it? What a hijacked drone swarm shows about agent-to-agent spoofing, replay attacks and the controls that stop them.

A2A security comes down to one question that most AI agent deployments never ask: when one agent gets a message from another, how does it know who sent it? If the answer is "the message says so," then anyone who can reach that channel can give your agents orders.
We built a lab to make that visible. Sixteen simulated drones coordinate over one radio channel with no central brain and no authentication. In our Hijack the Swarm workshop, teams listen to the channel and then start forging messages. One fake sighting sends three drones after a target that does not exist. One order sent in the commander's name drops a drone out of the sky. The drones' cockpit screens show the fake target as real, because as far as each drone can tell, it is.

Swap "drone" for "AI agent" and nothing about the attack changes.
What A2A security covers
Agent-to-agent (A2A) security is about the messages AI agents send each other: task requests, results, status updates and handoffs. It is one slice of the wider job of securing AI agents, which also covers permissions, tool access, prompt injection and monitoring. A2A security asks three narrower questions about every message:
- Who sent it? Can the receiver prove the sender's identity, or does it trust a name field?
- Is it fresh? Could someone record a valid message and play it back later?
- Should one message be enough? Is the action important enough that a single message from a single source should not trigger it?
A2A is also the name of a specific protocol. Google introduced the Agent2Agent protocol in April 2025 and later handed it to the Linux Foundation. Everything here applies to A2A deployments, and just as much to agents that talk over message queues, webhooks, chat channels or plain function calls.
Three attacks every multi-agent system should expect
- Spoofing. A message claims to come from a trusted agent. In the lab, a forged order in the commander's name grounds a drone instantly. In a business, it is a fake "approved by the finance agent" message that releases a payment, or a fake request from the IT agent that creates an account.
- Replay. A real, valid message gets captured and sent again. Even signed messages can be replayed unless each one carries something that expires, such as a timestamp, a sequence number or a one-time nonce. A replayed "pay invoice 4471" is a duplicate payment.
- Fake agents. Made-up agents join the conversation and claim work. In the lab, fake drones report that they are already covering a real target, so the swarm leaves it alone. In a business, fake workers claim tasks in a queue so the real ones never run, or fake status updates mark a check as done.
None of these needs a software bug. They work because the system was built to trust its own channel. That is also why the AI agents you didn't approve are such a problem: an agent nobody vetted is still a trusted voice on the channel.
Where authentication is optional today
Most agent and machine protocols make authentication possible. Few make it mandatory, so the real question is what your deployment enforces.
| Protocol | Built-in authentication | What to check |
|---|---|---|
| A2A (Agent2Agent) | Each agent declares the schemes it accepts, such as OAuth 2.0, OpenID Connect, API keys or mutual TLS | Every agent enforces authentication on incoming tasks, not just declares it |
| MCP (Model Context Protocol) | OAuth 2.1-based authorization for remote servers; local servers run with the trust of the process that starts them | Remote servers require authentication, and local servers come from a source you trust |
| MAVLink (drones) | Version 1: none. Version 2: optional message signing with a timestamp to stop replays | Signing is switched on for every link |
| Modbus (industrial) | None in classic Modbus; a TLS-secured variant exists | Older devices sit behind a gateway that authenticates |
| In-house agent frameworks | Whatever you built | Messages carry a verifiable sender identity, not a name field |
How to secure agent-to-agent messages
- Give every agent its own identity. One service account, certificate or key per agent. Never a shared key, because a shared key lets any compromised agent speak as all of them.
- Authenticate the message, not only the connection. Mutual TLS or an OAuth token proves which agent connected. Signing the message itself proves it was not changed on the way, and lets the next system check the sender again after the message has passed through a queue.
- Reject replays. Put a timestamp or sequence number inside the signed part of the message, and refuse anything that is too old or already seen.
- Limit what each agent may ask for. The finance agent should accept payment requests only from the agents that are supposed to send them, and only up to a set amount. Authentication tells you who is asking. Authorization decides what they are allowed to ask for.
- Require a second source for high-impact actions. Before paying, deleting data, granting access or changing bank details, check a system of record or ask a person. In the lab, the commander learns to flag targets that only one drone can see while its neighbors see nothing. Your agents can apply the same rule to a bank-detail change that only one email mentions.
- Keep message logs where agents cannot edit them. When something goes wrong you need a record of who said what, held outside the agents' reach. We covered why in the AI agent that writes its own audit trail.
- Watch the channel, but don't depend on watching. Detection catches sloppy attacks. In the lab, the commander writes a new detection rule after every round, and attackers adapt just as quickly. Monitoring is the backstop. Authentication is the fix.
Questions to ask before you connect two agents
- If an attacker could send one message to this agent, what is the worst thing it could make the agent do?
- Does each agent have its own credentials, or do they share one key?
- Can the receiving agent tell a fresh message from a recorded one?
- Which actions need a second source or a person, and is that enforced in code rather than in a prompt?
- Where do the message logs live, and can any agent change them?
Frequently asked questions
What is A2A security?
A2A (agent-to-agent) security protects the messages AI agents send each other, so an agent can verify who sent a message, confirm it was not altered or replayed, and decide whether it should act on it. It is one part of securing AI agents, alongside permissions, tool access and defenses against prompt injection.
Is the A2A protocol secure by default?
The Agent2Agent protocol supports standard authentication schemes such as OAuth 2.0, OpenID Connect, API keys and mutual TLS, and each agent declares which ones it accepts. Whether a deployment is secure depends on every agent actually enforcing them and checking what each caller is allowed to request.
What is a replay attack on AI agents?
A replay attack captures a valid message and sends it again later, for example a real payment request resent to trigger a second payment. A timestamp, sequence number or one-time nonce inside a signed message stops it.
How is A2A spoofing different from prompt injection?
Prompt injection hides instructions in content an agent reads, such as an email or a web page. A2A spoofing sends a message that pretends to come from another agent. Both abuse trust, and real incidents often combine them: an injected instruction makes one agent send a convincing message to the next. Our AI Agent Incident Tracker follows real cases.
See it for yourself
The fastest way to understand this is to try it. The Hijack the Swarm workshop puts teams on the attacking side of an unauthenticated swarm and then shows what stops them. If you are already connecting agents in production, an AI security assessment maps which agents talk to each other, what they can make each other do, and what to fix first.
Related from the BlueRadius Library
Sourced posts on adjacent topics, ranked by tag overlap.
AI Security
Shirudo Explained: Virtual Patching for Linux, and Its Limits
Shirudo, from OpenAI and Cisco, blocks exploits on running Linux systems with signed eBPF protections. How it works, the AI demo, and why it is not a patch.
ReadAI Security
'Skynet Mode': Attackers Are Hijacking Exposed AI Models to Run Their Attacks
Symantec caught an agent that hijacks exposed AI models to run attacks. What it means for mid-market companies, and five checks to run this week.
ReadAI Security
AI Coding Agents Have a Software Supply Chain, Too
Treat MCP servers and coding-agent plugins as dependencies: inventory them, verify provenance, scope credentials and re-review when tools or permissions change.
ReadAI Security
The AI Agent That Writes Its Own Audit Trail Is an Incident Waiting to Happen
Don't let an AI agent's summary close an incident. Reconcile agent traces with access, destination and approval records, and run a forged-record test.
ReadAI Security
Securing AI Agents: An Agentic AI Security Guide for 2026
An agentic AI security guide for mid-market: the agent attack surface, prompt injection, excessive agency, non-human identities, and a checklist.
ReadAI Security
Enterprise Product Security in the Age of Claude Code: What Security Leaders Must Do Now
Claude Code is entering enterprise codebases fast. See the 2026 security playbook: repo access controls, secret hygiene, and the controls CISOs need.
ReadRelated services