New AWS “AgentCorruption” Flaw Let Prompts Steal Cloud Secrets

In a serious discovery, researchers at Zenity Labs revealed a flaw dubbed “AgentCorruption” that made it possible for a single crafted prompt to hijack Amazon Bedrock AgentCore agents and extract sensitive AWS credentials. The vulnerability allowed attackers to access secret chats, long-term agent memory, source code, API keys, OAuth tokens, and anything stored in AWS Secrets Manager. All of this could be done simply by interacting with a public-facing agent.

How the Flaw Operates

AgentCorruption hinges on prompt-injection paired with underlying cloud privileges. An attacker tells the agent—via normal allowed instructions—to perform web requests. If given this tool, the agent can be tricked into contacting AWS’s metadata service at the internal endpoint 169.254.169.254, which yields temporary credentials based on the execution role tied to its microVM. Because the agent itself runs inside a microVM, such a request returns valid credentials without needing a bug in the UI or backend—just the combination of prompt trust, permitted tools, and permissive IAM settings.

Once the attacker obtains those credentials, they could roam across the AWS account and region. The breach allowed actions like discovering other agent instances, pulling container images from Amazon ECR, invoking internal agents, reading chat and memory history, and more—thanks to wide-open IAM permissions like DescribeLogGroups, ListEvents, or SecretsManager:GetSecretValue.

Timeline & Patch Status

Zenity Labs first reported access via metadata to AWS on December 25, 2025, with concerns over the overly broad agent permissions raised on January 12, 2026. In response, AWS shifted new deployments to require IMDSv2 access in February and later expanded that to all agents. By September 29, AWS had removed permissions that enabled chat access, secrets manager access, and unsecured agent invocation. The issues are now considered resolved.

AWS pushed back on labeling this as a vulnerability, arguing that agents do by design get their execution role credentials via the metadata endpoint. The company noted that cross-account access would still require explicit permissions. Still, official guidance reminds users that any code or actor inside the microVM can invoke the metadata service, making least-privilege roles and careful configuration absolutely essential.

What You Should Do

To prevent similar exposures, security teams are urged to drastically limit wildcard IAM permissions, vet prompt inputs, and segregate public and private agents. Controlling outbound network access, deploying gateway controls, and ensuring that no actor can bypass runtime security barriers are also advised. Finally, monitoring systems like CloudTrail and CloudWatch for abnormal requests or role usages helps detect possible misuse.

This incident serves as a reminder that AI agents in the cloud are not merely chat interfaces—they must be treated as full cloud workloads. Every shell tool, web access route, secret, and role granted expands an agent’s attack surface. Even if AWS has applied the fixes, it remains essential for users to review permissions before deploying agents in production—and to recheck whenever the setup changes.