Skip to main content
a promotional graphic telling you that PCI Compliance is no longer an annual exercise and that continuous monitory must be built in
AgentCorruption: One Prompt, Full AWS AccessIncident
5 min readFor Security Engineers

AgentCorruption: One Prompt, Full AWS Access

What Happened

A vulnerability in AWS Bedrock AgentCore allowed attackers to escalate from a single compromised AI chatbot to full control of an organization's AWS environment. The flaw, discovered by security researchers and now patched by AWS, exploited the trust relationships between Bedrock agents and the broader AWS infrastructure they interact with.

The attack vector was simple yet alarming: a malicious prompt could cause the agent to execute commands beyond its intended scope. Once the agent's permissions were hijacked, the attacker could access other AWS services, extract credentials, and establish persistence across the entire cloud environment.

AWS patched the vulnerability before public disclosure, but the incident reveals how AI integration creates new privilege escalation paths that traditional security controls weren't designed to detect.

Timeline

Discovery Phase: Security researchers found that Bedrock agents, designed to interact with AWS services on behalf of users, lacked sufficient isolation between user input and system-level operations.

Exploitation Window: The vulnerability existed from the initial release of AgentCore functionality until AWS deployed the patch. Organizations using Bedrock agents during this period had an exploitable attack surface.

Patch Deployment: AWS pushed the fix to all Bedrock instances without requiring customer action. This is cloud infrastructure security working as intended, but it also means you likely didn't know you were vulnerable until after the fact.

Current State: The specific vulnerability is closed, but the architectural patterns that enabled it remain across AI-integrated systems.

Which Controls Failed or Were Missing

Input Validation at the AI Layer: The agent accepted prompts that mixed user intent with system commands. There was no clear boundary between "what the user wants the AI to do" and "what operations the AI can perform on AWS infrastructure."

This isn't a traditional injection vulnerability where you sanitize SQL or HTML. AI agents interpret natural language, making it harder to distinguish malicious instructions from legitimate complex queries. Your standard input validation rules don't apply when the input is "please summarize this document and also export my IAM policies."

Least Privilege Enforcement: The Bedrock agent had broader AWS permissions than necessary for its core function. When compromised, those permissions became the attacker's permissions. If the agent only needed read access to S3 and DynamoDB, why did it have credentials that could touch IAM or EC2?

Isolation Between Tenants: The vulnerability allowed lateral movement between different parts of the AWS environment. Your AI chatbot shouldn't be able to touch production databases, but the permission boundaries weren't enforced at the infrastructure level.

Monitoring and Anomaly Detection: Organizations running Bedrock agents likely had no visibility into unusual permission requests or API calls originating from the agent. Your CloudTrail logs showed legitimate AWS SDK calls, not an obvious attack pattern.

What the Relevant Standards Require

NIST 800-53 Rev 5 AC-6 (Least Privilege): "Employ the principle of least privilege, allowing only authorized accesses for users (or processes acting on behalf of users) that are necessary to accomplish assigned organizational tasks."

Your AI agent is a process acting on behalf of users. It needs the minimum permission set to function, not broad access to your AWS environment. When you deploy an agent, you're creating a new identity with its own threat profile.

ISO/IEC 27001:2022 Control 8.3 (Information Access Restriction): Access to information and other associated assets must be restricted in accordance with the established topic-specific policy on access control.

This applies to AI agents as much as human users. Just because the agent needs to interact with AWS services doesn't mean it needs unrestricted access. You need an access control policy that treats agents as distinct entities with defined boundaries.

OWASP ASVS v4.0.3 Section 4.1 (Access Control): "Verify that the application enforces access control rules on a trusted service layer, especially if client-side access control is present and could be bypassed."

The AI interface is your client-side layer. Users submit prompts, but the enforcement must happen at the service layer where the agent interacts with AWS APIs. You can't trust the agent to self-limit based on prompt content.

PCI DSS v4.0.1 Requirement 7.2.2: Access control systems are configured to enforce permissions assigned to individuals, applications, and systems based on job classification and function.

If you're processing cardholder data through AI-assisted workflows, the agent's access must be explicitly defined and regularly reviewed. "The AI needs access to customer data" isn't a valid access justification.

Lessons and Action Items for Your Team

Audit Your AI Agent Permissions Today: Pull the IAM roles attached to any Bedrock agents, SageMaker endpoints, or other AI services in your environment. For each permission, document why it's required and what happens if you remove it. Then remove it and test. You'll find permissions granted "just in case" that create unnecessary risk.

Implement Prompt Injection Detection: Build monitoring that flags prompts attempting to combine user requests with system-level operations. Look for keywords like "export," "credentials," "assume role," or "policy" in prompts that shouldn't need those functions. This won't catch everything, but it raises the cost of exploitation.

Separate Agent Environments by Sensitivity: Your customer service chatbot shouldn't run in the same AWS account as your production database agents. Create isolated environments with separate credential stores and network boundaries. If one agent is compromised, the blast radius stays contained.

Log Agent API Calls Separately: Configure CloudTrail to tag all API calls originating from AI agents with a distinct identifier. Set up alerts for any agent making calls outside its expected pattern. If your summarization agent suddenly starts listing EC2 instances, you want to know immediately.

Review Agent Permissions Quarterly: Add AI agent access reviews to your existing identity governance process. Treat agents like service accounts with elevated privileges. Who approved the current permission set? When was it last validated? What would break if we reduced it?

Test Your Agents with Adversarial Prompts: Before deploying an agent to production, attempt to make it perform unauthorized actions through carefully crafted prompts. If your red team can trick it into exposing credentials or accessing restricted resources, so can an attacker.

The AgentCorruption vulnerability is patched, but the architectural risk remains. Every AI agent you deploy is a new identity with its own attack surface. Treat it accordingly.

Topics:Incident
Promotional banner graphic asking if you are ready for PCI DSS 4.0 with a call-to-action to get the guide

You Might Also Like