AWS AgentCore Harness Prompt Injection Can Expose Identity Credentials
Emerging Technology Risk · 2 sources · Updated 2mo ago · First seen Jun 10, 2026

Unit 42 found that AWS AgentCore Harness’s default-enabled shell and file_operations tools can let an indirect prompt injection achieve arbitrary command execution inside an agent runtime. In testing, the shell ran as root and read memory from the root-owned harness runtime, exposing a plaintext Amazon Cognito JWT that AgentCore Identity had resolved for a simulated MCP service account; researchers replayed the token remotely to access simulated customer PII.
AWS classified the May 2026 report as informative under its shared-responsibility model, pointing to customer-managed controls including allowedTools scoping and egress filtering. Organizations using AgentCore Harness should restrict permitted tools for each invocation, apply least privilege to Identity-vault service accounts, and monitor outbound network traffic from harness containers for credential exfiltration or token replay activity.
Why it matters
Impact assessment
AWS AgentCore Harness deployments that process untrusted content are exposed to credential theft and downstream data access when shell or file_operations remain enabled and the runtime permits shared-process memory access. A successful indirect prompt injection can produce arbitrary command execution as root, steal plaintext credentials resolved at runtime, and replay those credentials outside AWS to access connected services and their data.
- Affected population: Organizations using AWS AgentCore Harness, especially agents that ingest support tickets, documents, web content, or other attacker-influenced inputs and invoke downstream services through AgentCore Identity.
- Business impact: Exposure includes unauthorized access to downstream APIs, customer PII, service operations, and ticketing or workflow systems. Stolen service-account tokens may enable actions beyond the permissions of the user who invoked the harness.
- Scope: This is a configuration and privilege-boundary risk rather than an AWS-confirmed product vulnerability. Exploitation requires prompt injection delivery, access to a privileged tool, readable target-process memory, a usable in-memory credential, and outbound network access.
- Demonstrated impact: Unit 42 exfiltrated an Amazon Cognito JWT and a simulated MCP server URL, replayed the token remotely without AWS credentials, retrieved simulated customer PII through
lookup_customer, and created a ticket. - Exploitation status: A controlled research demonstration was published. The supplied sources do not report exploitation in the wild.
- AWS disposition: AWS closed HackerOne report #3747844 as informative on June 10, 2026, citing the shared-responsibility model and customer-controlled tool scoping and egress filtering.


