AWS AgentCore Harness: How a Support Ticket Can Steal an Agent’s Credentials (Unit 42)

By Carlos Montiel | Enterprise AI Specialist
Leer en español →
Published: 2026-10-06 | By: Carlos Montiel | Reading time: ~4 minutes

Encryption at rest and in transit doesn’t help if, at the moment of use, the credential sits in plaintext in the memory of a process the agent can read. Unit 42 demonstrated this in AWS AgentCore Harness, and AWS decided the responsibility lies with the customer.

What Unit 42 demonstrated

According to Unit 42’s report (Palo Alto Networks), under the default AgentCore Harness configuration, an indirect prompt injection can end in the theft of plaintext credentials managed by AgentCore Identity. A single support ticket with hidden instructions was enough to make the agent run a shell command, read the harness process memory, locate a live JWT, and send it to an attacker-controlled endpoint, as the Cloud Security Alliance summary also notes.

How the attack chain works

1. A ticket with hidden instructions reaches the agent (indirect injection) 2. The agent uses the shell tool (on by default, runs as root) 3. It reads /proc/[pid]/mem and /proc/[pid]/maps of the harness process (PID 1) 4. It scans the heap: the credential resolved from the vault sits in plaintext 5. It extracts the JWT and exfiltrates it over the network

The root cause is a design issue: the shell and file_operations tools are available in every session unless you restrict them with allowedTools, they run as root, and they share a memory space with the process that decrypts the vault credentials.

AWS’s response

Unit 42 reported the finding through HackerOne on May 19, 2026. AWS clarified the scope between June 8 and 10 and closed the report as “informative” under AgentCore’s shared responsibility model: there was no patch and no CVE, and AWS pointed to controls the customer can configure.

Important: this is not a bug that can be exploited out of the box. It requires the agent to process attacker-controlled content (tickets, emails, documents) and to have the shell tool enabled. But that combination is exactly what a typical support agent looks like.

What this means for a company running agents on AWS

Mitigations Unit 42 recommends: (1) limit allowedTools at invocation, leaving only the tools that are strictly needed; (2) apply least privilege to the Identity vault’s service accounts for downstream integrations; (3) monitor outbound traffic from the harness containers. I would add a fourth: if an agent reads third-party content, don’t give it a shell. The broader lesson is that “the provider encrypts the credentials” does not mean “the agent can’t read them”: review each agent platform’s defaults before going to production.
Carlos Montiel
Enterprise AI Solutions Architect
Specialist in LLMs, Agents, and Orchestration
guatemalia.com/#contacto · info@guatemalia.com

Need to implement AI in your company?

Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG, and orchestrators for companies across Guatemala and Latin America. Reach out for a consultation.

Contact Carlos Montiel

info@guatemalia.com