P.K. SHARMA

Cyber security intelligence, AI governance, practitioner analysis

Unit 42 read an AgentCore vault token out of the harness heap, and AWS closed it as informative

Unit 42 used an indirect prompt injection to make an AWS AgentCore agent read a decrypted vault token out of its own runtime memory, then replayed it from a laptop. AWS closed the report as informative.

By Parminder Kumar Sharma · · 19 min read

Editorial illustration for the briefing: Unit 42 read an AgentCore vault token out of the harness heap, and AWS closed it as informative

Two fixes and one refusal

In August 2026 Amazon Web Services published two security bulletins for the same corner of its agent stack, and fixed both.

CVE-2026-18830, bulletin 2026-073, published 4 August: the Amazon Bedrock AgentCore harness could dispatch a tool named directly by the caller, skipping the model and the controls that sit around it. AWS, which is the assigning authority for its own CVEs, scored it 8.6 under CVSS 4.0 and 8.1 under CVSS 3.1. The fix was server side, applied to the managed API before 31 July 2026, and the bulletin says no customer action is required.

CVE-2026-18733, bulletin 2026-072, published 3 August: the shell tool in Strands Agents Tools, the open source framework that powers the AgentCore harness, exposed a parameter the model could set that skipped the human consent gate on command execution. AWS scored it 7.5 under CVSS 4.0 and 8.8 under CVSS 3.1. The fix was version 0.8.0.

On 18 September 2026 Unit 42, the research arm of Palo Alto Networks, published a third finding in the same place. AWS had closed it on 10 June as informative.

That is 100 days between the closure and the publication, and 93 days between the harness reaching general availability on 17 June 2026 and today. In that time the sentence at the heart of the finding has not changed. AWS's own Tools page for the harness, fetched this morning, still reads:

Default tools shell and file_operations are available in every session unless you restrict them with allowedTools.

Two lines later the same page adds: if allowedTools is omitted, all tools are allowed.

What that does not establish. It does not establish that AWS was wrong to close the report, that the finding is more severe than the two AWS fixed, or that AgentCore is less safe than a rival runtime. The three findings differ along an axis that has nothing to do with impact. The two AWS fixed describe the harness doing something its documentation did not say it did. The one AWS closed describes the harness doing, precisely and in public, what its documentation says it does.

That is the interesting part, and it is the part a UK cloud team has to make a decision about. A documented default is not a safe default. It is a default you have been told about.

What an agent harness is, and what it hands the agent

AWS's framing is worth taking at face value, because the research depends on it. In the general availability announcement of 17 June, AWS put it this way: if the model is the brain, the harness is the body. You declare an agent in configuration, naming the model, the tools, the skills and the instructions, and AgentCore assembles and runs the orchestration loop.

What the configuration buys you, in AWS's words on the harness overview page, is a production grade agent running "in minutes in its own isolated environment, with a filesystem and shell". Every session gets its own Firecracker microVM. Sessions last up to eight hours on a microVM, and the default cap on reasoning and action cycles per invocation, maxIterations, is 75.

Two tools come switched on. shell executes bash commands. file_operations views, creates and edits files. They are not opt in, they are opt out, and the opt out is the allowedTools parameter.

AWS gives a second, quieter reason to set it. The two default tool definitions add roughly 900 input tokens to every model request, whether or not the agent ever calls them, and one invocation can make many model requests. At the default cap of 75 cycles that is on the order of 67,500 input tokens per invocation spent describing two tools you may never have wanted. The arithmetic is mine and the AWS page warns that the exact count varies by model, so treat it as an order of magnitude rather than a bill.

There is a third thing worth knowing before the research makes sense. allowedTools scopes the model's tool selection during InvokeHarness only. It has no effect on InvokeAgentRuntimeCommand, the separate API that runs shell commands in a live session without the model in the path at all. AWS states the remedy plainly: to prevent direct command execution, do not grant bedrock-agentcore:InvokeAgentRuntimeCommand in your IAM policies.

What Unit 42 actually demonstrated

Unit 42's researcher, Niv Rabin, built a fictional operator called SupportCo: a customer support agent on AgentCore harness that reads inbound tickets, looks up account records through a downstream Model Context Protocol server, and answers. The MCP server required an Amazon Cognito bearer token. That token was stored in the AgentCore Identity token vault and referenced from the harness configuration by ARN, which is the pattern AWS documents.

The chain that followed has five steps, and the honest version includes what had to be true for each.

Reconstructed from Unit 42's account of its own test rig. The right column is the article's reading of what each step required.

StepWhat Unit 42 didWhat it needed to be true
1Landed an instruction in a hidden HTML comment inside a support ticket, telling the agent to fetch a script and pipe it to python3The agent processes content the operator does not control, and the harness has network egress
2Got the shell tool to run itThe shell tool was in scope. Unit 42 reports the well aligned model refused twice, so they selected a more permissive model per invocation
3Ran whoami and id, and read the process list from the proc filesystemRoot inside the microVM. Unit 42 reports the shell subprocess ran as root, a direct child of process 1
4Read process 1's memory and scanned it for a token pattern and the MCP server URLProcess 1 was the harness runtime, the same UID on both sides, and its memory readable
5Posted a 1,034 byte token and the MCP URL to an external webhook, then replayed themOutbound HTTP to an endpoint that was not a configured integration

Step 2 deserves more weight than the coverage gives it. Unit 42 says the capable model refused the direct request twice. What made the chain work was not beating a model's judgement, it was choosing a different model, which the harness allows per invocation. AWS documents that as a customer risk in its own security page: callers who can set the model fields can redirect inference to a different model, region or provider entirely.

So the precondition is real, and it cuts both ways. It is a genuine caveat on the demonstration. It is also a configuration surface AWS hands to the caller by design, and one most operators have not thought about.

A trust boundary diagram of one AgentCore harness session. Inside a shaded microVM band, the harness runtime is process 1 and turns a vault ARN into the real token, which then sits in plaintext in the process heap; the shell tool, on by default and running as root, reads that memory and sends the token out through network egress, which is public by default. Arrows run from the Identity vault in, and out to an attacker endpoint and on to the MCP server that accepted the replayed token.
Drawn from Unit 42's account of its test rig and from AWS's AgentCore documentation on the harness, its tools, its environment, its network defaults and its runtime security model. Where AWS is silent, the text says so.

Whose identity was that, and why it was that one

The question that matters for a cloud team is not how the token left. It is why that token was there at all.

Unit 42's answer is the clearest part of the research. An end user's session token cannot live in a vault: it is minted at login, expires quickly, and belongs to whoever happens to be signed in. You cannot pre enrol it, and you cannot stand up a harness per user to hold it. So what goes into the vault is the stable credential, the operator's service account, wired in once and reused across every session.

AWS documents the consequence from the other direction. On the harness security page it notes that when callers authenticate with SigV4, the harness does not propagate per user identity into downstream tool calls, so the per user features of AgentCore Identity, including user scoped token storage and on behalf of exchange, are available only when callers authenticate with a bearer JWT through the inbound OAuth path. SigV4 support for per user identity is described as planned for a future release.

Put those two statements side by side and the shape is clear. A caller authorised to do one thing, invoke the harness, reaches a runtime that acts as something with far broader authority. AWS's own credentials guidance names the failure mode directly, advising operators to avoid privilege escalation by ensuring the execution role has equal or fewer privileges than the users who can invoke it.

That is good advice, and it is quietly hard to follow. The reason an operator reaches for an agent is usually that it should be able to do things the caller cannot.

Stated and not stated in AWS's documentation

Everything in the left column below is a sentence I fetched from AWS's developer guide today. Everything in the right column is something the same documentation does not say, checked across the harness overview, tools, environment, security, sessions, credentials and runtime best practice pages.

Left column quoted or closely paraphrased from the AWS Bedrock AgentCore developer guide, accessed 18 September 2026. Right column: absent from the same pages on that date.

Stated by AWSNot stated by AWS
The shell and file_operations tools are available in every session unless allowedTools restricts them, and if allowedTools is omitted, all tools are allowedThat the model invoked shell tool runs as root in the same process user as the harness runtime
Commands have full access to the container filesystem and any configured credentials or secrets within the microVM, and the isolation boundary is the microVM itselfThat a vault credential resolved for use remains in that process's heap in plaintext, readable through the proc filesystem
MMDS provides execution role credentials to any code or actor running inside the VM, similar to EC2 instance metadataWhether a resolved vault credential is cleared from memory after the downstream call completes
Input validation and prompt injection prevention are the customer's responsibility, including validating InvokeHarness inputAny change to the default availability of the shell tool since the report was closed on 10 June 2026
Commands run as root, uid 0, within the microVM, and a USER directive in your Dockerfile applies only to the agent processAny CVE, bulletin or advisory covering this finding, unlike CVE-2026-18830 and CVE-2026-18733

Two of those left column entries are worth reading twice. AWS states, in its runtime security best practices, that commands reach any credentials inside the microVM and that the microVM is the boundary. It also states, in its credentials page, that any code or actor inside the VM can retrieve the execution role's temporary credentials from the metadata service.

Unit 42 did not use the metadata path. It did not need to. But a defender should note that the documented capability is broader than the demonstration: the metadata route reaches AWS IAM credentials, scoped to whatever the execution role allows, and it is a documented property of the platform rather than a finding. That is an inference about reachability from AWS's own text, not something Unit 42 showed.

A vault is a word about storage

AgentCore Identity's terminology page defines the token vault as secure storage for OAuth tokens and API keys that "ensures credentials can only be accessed by the specific agent and user combination that originally obtained them". The data encryption page adds that vault contents are encrypted at rest with AWS owned keys by default, or with a customer managed KMS key, and in transit throughout.

Every one of those statements is true, and none of them is about the moment that mattered. Access control on the vault governs who may ask the vault for a credential. Encryption at rest governs the bytes on disk. Encryption in transit governs the bytes on the wire. The heap is none of those places.

Unit 42's own summary is the shortest version: vaults protect at rest and in transit, not in use.

Why AWS closed it, and whether that holds

AWS's position, as Unit 42 reports it, is that the finding falls under the AgentCore shared responsibility model, and that the customer side controls are allowedTools scoping and egress filtering. AWS's own harness security page sets out the same split. On the AWS side: infrastructure and microVM isolation at hardware level, kernel patching, the managed harness runtime code including validation of the request structure InvokeHarness accepts, and network infrastructure. On the customer side, among others: IAM access controls, security of commands executed in runtime sessions, input validation and prompt injection prevention, model configuration validation, and network configuration.

Read against that list, the closure is internally consistent. Two of the customer's named responsibilities are exactly the two links in the chain.

Compiled from the two AWS security bulletins, the corresponding NVD records and Unit 42's disclosure timeline. Scores are AWS's own, as the assigning authority; CISA added a decision record to both NVD entries but no score.

FindingAWS treatmentWhy the treatment differs
CVE-2026-18830, harness dispatched a caller named tool without the modelFixed server side before 31 July 2026, CVSS 4.0 8.6, no customer actionThe harness accepted a request shape it had never said it would honour
CVE-2026-18733, shell consent gate bypassed by a model set parameterFixed in Strands Agents Tools 0.8.0, CVSS 4.0 7.5A documented safeguard did not hold
Unit 42 heap read of a resolved vault tokenClosed as informative on 10 June 2026, no CVE, no bulletinEvery step is documented behaviour operating as described

Where the closure gets uncomfortable is the marketing. The general availability announcement says that identity, memory and observability come from the same platform, "so every agent action is governed and traced from the first call without additional wiring". Tracing is real: the harness operations page confirms that model calls, tool invocations, memory operations and shell commands each appear in CloudWatch traces with timing and payload detail, from the first invocation and with no extra configuration, though you do need Transaction Search enabled in CloudWatch once per account.

Governed is doing more work. A trace of a shell command that read process memory is a record, not a control. The control that would have stopped it, allowedTools, ships in the permissive position, and the operator has to know to set it on the invoke call rather than at creation.

There is a second asymmetry worth naming. AWS advises, in runtime security best practices, that you run containers as non root when you build custom images, and notes on the environment page that a USER directive in your Dockerfile applies only to the agent process. The managed harness image is AWS's, not yours. Unit 42 reports that the shell subprocess and the runtime shared root and the same user id. On the evidence available, non root is advice a customer can follow for their own container and cannot apply to the managed one. AWS's documentation does not state the managed harness image's user, so this rests on Unit 42's observation of one deployment.

Unit 42's interest, stated plainly

Unit 42 is Palo Alto Networks. The research closes by recommending Cortex Cloud and the Unit 42 Cloud Security Assessment, and links its incident response line. That is a commercial position and it should be visible when you read the recommendations.

It does not touch the findings. The method is reproducible from the description, the disclosure went through AWS's HackerOne programme with a report number and a merge into an earlier report, and the three operator recommendations it ends on name AWS parameters rather than Palo Alto products: scope allowedTools, scope vault service accounts to least privilege, and watch outbound traffic from harness containers. Two of those are AWS's own documented controls. The third is generic network monitoring.

Take the evidence at full weight and the product conclusions at whatever weight you would give any vendor's.

Three questions for a UK cloud team

We covered a related pair of findings on 16 September: browser extensions commanding built in AI agents through pages those agents were built to obey, and Mandiant's case study of an attacker hijacking a live AI coding session. The lesson there was that the channel is the privilege. Mandiant's controls in that report, and ours, came down to keeping long lived tokens out of reach of the assistant's session and controlling what an assistant session can reach on the network.

This is the managed cloud version of the same sentence, and it converts into three questions you can put to any agent deployment.

The three questions, with where AgentCore's answer is written down.

QuestionAgentCore's answer todayWhere AWS states it
Which identity does the agent act as?The execution role for AWS calls, and the vault service account for downstream tools. Not the caller, unless inbound OAuth is configuredHarness security page, SigV4 and per user identity note
What can that identity reach?Every downstream service the operator wired in, plus whatever the execution role allows through the metadata serviceCredentials management page and the execution role policy
Can a sentence move it?Yes, while the shell tool is in scope and the session has egressTools page defaults, and the customer side of the shared responsibility split

If you cannot answer the first question for an agent already in production, that is the finding, and it does not require anyone's research to reach you.

What to do

Take this with you

In the order it is worth doing

  • List every AgentCore harness in your accounts and, for each one, find the code path that calls InvokeHarness. AWS states that allowedTools scopes tool selection at invoke time, not at CreateHarness, so the harness definition alone will not tell you what a session can run.
  • Set allowedTools on every invoke to the tools that request actually needs. If a session never needs bash, the builtin glob patterns AWS documents let you exclude it by name rather than listing everything else.
  • Check whether any IAM policy grants bedrock-agentcore:InvokeAgentRuntimeCommand or InvokeAgentRuntimeCommandShell. AWS's own guidance is to withhold these unless you need direct command execution, because allowedTools does not constrain them.
  • Scope the execution role as if any code in the VM could use it, because AWS documents that it can through the metadata service. Aim for the AWS stated test: the execution role should have equal or fewer privileges than the people who can invoke the agent.
  • Confirm MMDSv2 is enabled on every runtime. AWS made it mandatory from 30 June 2026, which was 80 days ago, and a runtime without it returns a ValidationException on invoke rather than failing quietly.
  • Decide which identity downstream calls should carry. If you need per user scoping, configure the inbound JWT authorizer, because AWS states that SigV4 callers get no per user identity propagation into downstream tools.
  • Move the harness into VPC mode. AWS states that harness sessions run on the public network by default, so egress control is a thing you add, not a thing you inherit. Use private subnets with a NAT gateway, least privilege outbound security group rules, and the interface and gateway endpoints AWS lists for ECR, S3 and Bedrock runtime, or sessions will fail to start.
  • Turn on VPC Flow Logs and alert on any outbound destination that is not a configured integration. Unit 42's phrasing is worth borrowing: an endpoint that is not on your integration list is evidence of an injection, not configuration drift.
  • Strip caller controllable fields in your application layer before they reach InvokeHarness. AWS names the ones that matter: the model block including additionalParams, apiBase and modelId, the skills field, and the tools field. The permissive model swap that made the research work goes through the first of these.
  • Front downstream tools with AgentCore Gateway and Cedar policies instead of raw MCP headers. AWS's tools page already recommends this for managed credential rotation, and it moves authorisation decisions out of the session.
  • Enable Transaction Search in CloudWatch and confirm you can see shell commands in a harness trace. If you cannot, the observability that AWS says arrives from the first call is not reaching you.
  • Rotate any long lived credential sitting in a token vault that a harness with shell in scope has referenced while handling untrusted content. This is our recommendation, not AWS's, and it is precautionary: there is no public evidence of exploitation.

The question that exposes the gap

AWS is right that this is shared responsibility, and the documentation does say what it does. The awkwardness is that the sentence which carries all the weight, "available in every session unless you restrict them", is a sentence about a default, and the people reading it are configuring an agent, not conducting a threat model. The two AgentCore issues AWS did fix in August are both cases where the product surprised its own documentation. This one is a case where the documentation surprised its readers.

An agent runtime is now an identity boundary whether or not anyone designed it as one. The vault, the microVM and the IAM gate are all real controls, and each of them protects a different thing from the one that failed.

So the question to put to any team running an agent in production, in AWS or anywhere else, is not whether the model can be tricked. Assume it can. It is this: name the identity your agent's downstream calls are made under, list everything that identity can reach, and show what stops a sentence in an inbound support ticket from using it.

Sources

  1. PrimaryThe research itself: method, the shell tool running as root, the heap scan, the replay, the disclosure timeline and AWS's responseUnit 42, Palo Alto Networksaccessed 2026-09-18
  2. PrimaryAgentCore harness Tools: the default shell and file_operations tools, allowedTools scope and patterns, token overhead, and the InvokeAgentRuntimeCommand caveatAmazon Web Servicesaccessed 2026-09-18
  3. PrimaryAgentCore harness Security and access controls: the shared responsibility split, trust boundary, model parameter risks, network defaults and inbound OAuthAmazon Web Servicesaccessed 2026-09-18
  4. PrimaryAgentCore harness overview: managed runtime, microVM per session, built-in filesystem and shellAmazon Web Servicesaccessed 2026-09-18
  5. PrimaryAgentCore harness Environment and filesystem: commands run as root, uid 0, and a USER directive applies only to the agent processAmazon Web Servicesaccessed 2026-09-18
  6. PrimarySecurity best practices for AgentCore Runtime: command execution boundary, MMDS, MMDSv2 deadline, network, auditing and the shared responsibility modelAmazon Web Servicesaccessed 2026-09-18
  7. PrimaryCredentials management: MMDS serves execution role credentials to any code or actor running inside the VMAmazon Web Servicesaccessed 2026-09-18
  8. PrimaryIsolated sessions: dedicated microVM per session, memory sanitised at termination, and session to user mapping left to the customerAmazon Web Servicesaccessed 2026-09-18
  9. PrimaryAgentCore Identity terminology: the token vault definition and its access claimAmazon Web Servicesaccessed 2026-09-18
  10. PrimaryAgentCore Identity data encryption: token vault encryption at rest with AWS owned or customer managed KMS keysAmazon Web Servicesaccessed 2026-09-18
  11. PrimaryObservability and cost controls: automatic traces covering model calls, tool invocations and shell commands, and the default maxIterations, timeoutSeconds and idle timeoutAmazon Web Servicesaccessed 2026-09-18
  12. PrimaryAWS security bulletin for CVE-2026-18830, the AgentCore harness input validation issue that AWS fixed server sideAmazon Web Servicesaccessed 2026-09-18
  13. PrimaryAWS security bulletin for CVE-2026-18733, the Strands Agents Tools shell consent gate bypassAmazon Web Servicesaccessed 2026-09-18
  14. PrimaryNVD record for CVE-2026-18830, used for the CVSS scores, the assigning source and the vulnerability statusNIST National Vulnerability Databaseaccessed 2026-09-18
  15. PrimaryNVD record for CVE-2026-18733, used for the CVSS scores and the assigning sourceNIST National Vulnerability Databaseaccessed 2026-09-18
  16. PrimaryThe general availability announcement for AgentCore harness, used for the GA date and the governance claimAmazon Web Servicesaccessed 2026-09-18
  17. PrimaryKnown Exploited Vulnerabilities catalogue, checked for both AgentCore CVEsCISAaccessed 2026-09-18
  18. Reported byOur 16 September briefing on the BragJack findings and Mandiant's case studies, used for the continuity on trusted channels and credential reachP.K. Sharmaaccessed 2026-09-18

Share this briefing

Know someone who owns this problem? Send it to them.

Related briefings

The briefing, in your inbox

Practitioner analysis of cyber and AI security news. No vendor noise.

One email per briefing. Unsubscribe any time.