Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentAI infrastructure

AWS Bedrock AgentCore: one prompt made an agent hand over its role's credentials, and the default role reached every agent in the region

HighAWSZenity

Zenity Labs (Tamir Ishay Sharbat and Lana Salameh) published AgentCorruption on October 8, 2026 and presented it at SecTor 2026. Agents on AWS Bedrock AgentCore run in Firecracker microVMs that could reach the instance metadata service, so any agent tool that makes HTTP requests could be told, with one prompt to a public-facing agent, to fetch the temporary credentials of the agent's role. The default execution role covered every AgentCore resource in the region: with it the researchers discovered other agents through CloudWatch log groups, pulled their container images, invoked them, read their conversation events, wrote memories that changed their behavior across sessions, and read API keys and Secrets Manager secrets. Zenity reported the metadata access on December 25, 2025 and the blast radius on January 12, 2026. AWS says AgentCore has used IMDSv2 only for new agents since February 14, 2026; Zenity found the default role unchanged in June and substantially restricted on September 29, without the rights to invoke other agents, read conversations or reach Secrets Manager. AWS disputes the research as "expected and documented behavior", says an agent reaches another account only with permissions a developer grants, and recommends least-privilege execution roles. Zenity has seen no exploitation in the wild.

Replay the attack step by step in the Learning Center

How it happened

  1. A prompt asks an agent with an HTTP tool to request the metadata address, and the reply carries the role's temporary credentials.
  2. The default role was scoped to the whole region, so those credentials could find, invoke and read every other agent, and write to their memory.
  3. The same role could read API keys and Secrets Manager secrets, so the agents' tool credentials went with it.

Impact

Control of every AgentCore agent in the same account and region from one prompt to one public agent, by the researchers' account; no exploitation reported.

The fix

AWS moved new agents to IMDSv2 and narrowed the default execution role. Give each agent its own least-privilege role, check the roles of agents deployed before the change, block metadata access from agent tools where you can, and keep public-facing agents apart from internal ones.

Lessons

  • An agent that can make web requests can be talked into forging them; the metadata endpoint is the first place it will be sent.
  • A managed platform's default role decides the blast radius of one bad prompt; read it, do not inherit it.

Sources