← Lab /Security & privacy

Default shell tool in AWS AgentCore Harness can exfiltrate plaintext credentials from Identity vault

The built-in shell tool, enabled by default in AWS AgentCore Harness, allows an attacker to read and exfiltrate plaintext JWT credentials from the AgentCore Identity vault at runtime.

Security & privacy Unit 42 18 Sep 2026 Disclosure Prototype evidence

Published as “A Vault with a Heap-View: The Uncomfortable Space Between AgentCore Harness and Identity”

Why it matters

Plaintext credentials resolved at runtime can be stolen despite encryption at rest and in transit, highlighting a gap in AgentCore's in-use protection.

Summary

The researchers examined AWS AgentCore Harness with its default-enabled shell tool and discovered that the tool runs as root and can read the harness process memory via /proc/1/mem. By scanning the heap they extracted a JWT credential stored in the AgentCore Identity vault and sent it to an attacker-controlled webhook. The credential was then replayed against a downstream MCP server to retrieve protected customer data. The evidence comes from a single controlled test harness and a simulated MCP service, demonstrating a complete end-to-end attack chain.

What they found 1

  1. The built-in shell tool runs as root and can read the harness process memory.

    “the shell tool - the subprocess that runs whatever code the model decides to execute - was running as root.”

Caveats 3

  • AWS reviewed and closed the report as informative under the AgentCore shared responsibility model, citing allowedTools scoping and egress filtering as customer-side controls.
  • The shell tool - the subprocess that runs whatever code the model decides to execute - was running as root.
  • The attack relies on the default configuration where allowedTools includes the shell tool; scoping allowedTools can mitigate the issue.

What’s new here 4

  • Identified that the default shell tool runs as root and can read /proc/1/mem to access plaintext credentials.
  • Demonstrated extraction of a 1,034-byte JWT and its associated MCP endpoint from the harness heap.
  • Showed end-to-end credential replay to obtain PII from a downstream service without AWS credentials.
  • Provided concrete mitigation steps: scope allowedTools, apply least-privilege to vault service accounts, and monitor outbound traffic.