A Vault with a Heap-View: The Uncomfortable Space Between AgentCore Harness and Identity
The default AgentCore Harness configuration enables a built-in shell tool that runs as root in the same process space where AgentCore Identity resolves vault credentials to plaintext. An attacker who lands an indirect prompt injection in a support ticket could make the agent run code that reads the harness process memory and exfiltrates the operator's service-account JWT, which is then replayable against the downstream MCP server to reach customer PII.
Unit 42 researchers have identified an issue where using default configurations in Amazon Web Services (AWS) AgentCore Harness could allow attackers to steer an agent's actions through prompt injection to exfiltrate plaintext credentials managed by AgentCore Identity.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the built-in shell tool runs as root in the same process and user context as the harness runtime that resolves vault credentials to plaintext, so no isolation exists between untrusted agent-executed code and secrets in memory.
Impact
An attacker could steal the operator's long-lived service-account token and replay it from anywhere to reach downstream data such as customer PII; AWS closed the report as informative, treating tool scoping and egress filtering as customer responsibilities, so the default configuration remains exposed.
What the attacker needed
Default harness configuration; attacker can submit a support ticket; agent processes the injected ticket; outbound network egress allowed
The fix
Operators should scope allowedTools to only what each session needs, apply least privilege to the vault service accounts, and monitor outbound traffic from harness containers.
How it was found
- Send a support ticket containing a hidden instruction telling the agent to fetch and run a script
- The agent reads the ticket and runs the script through the built-in shell tool
- The script reads the harness process memory map and scans readable regions for the token and the MCP server URL
- The script posts the token and URL to an attacker-controlled endpoint
- Replay the stolen token against the MCP server from an ordinary machine to list tools and read customer data
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
An AI agent runtime keeps secrets, like login tokens, in a protected vault. But to actually use a token, the runtime has to decrypt it into ordinary readable text inside its own memory. Here the agent also had a command-line tool switched on by default, running with the highest privileges, so anyone who could trick the agent into running a command could simply read that memory and steal the token.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.