AgentCore Starter-Toolkit IAM Exposes Other Agents' Memory
Unit 42 demonstrated that starter-toolkit-created AgentCore execution roles used broad resource wildcards for ECR, AgentCore Memory, runtime, and Code Interpreter actions. After an initial agent is compromised, its role can pull another agent's image, recover a MemoryID from the image, and read that agent's memory records; Unit 42 states the same permission shape would also allow poisoning, which the test did not demonstrate. AWS clarified that generated roles are for development and testing, not production.
Threat Analysis
The starter toolkit gave an agent execution role broad resource patterns. Unit 42 showed how control of one agent could be converted into access to a different agent's ECR image, then to its MemoryID and memory records. The MemoryID is a locator; the real failure is cross-resource authorization.
- The research assumes control of one AgentCore agent deployed with the toolkit's broad execution role; it does not claim to have discovered a particular initial intrusion.
- Wildcard ECR permissions allow the compromised agent's role to authenticate and pull a target agent's container image in the account.
- Static inspection of the pulled image exposes a BEDROCK_AGENTCORE_MEMORY_ID value for the target agent.
- Wildcard AgentCore Memory permissions let the compromised agent use the recovered ID to read another agent's memory records. The quoted role grants read actions; Unit 42 describes poisoning as a possible extension that the test did not demonstrate.
This study assumes an initial compromised agent. It also identifies broad Code Interpreter and InvokeAgentRuntime permissions, but the SecureFlow follows the tested ECR-to-memory path. AWS says automatically created roles are for development and testing.
Applicable AIDEFEND Defenses (7)
What Defenders Should Do Now
- Replace starter-toolkit-generated production roles with workload-specific IAM policies scoped to exact ECR repositories, AgentCore Memory resources, runtimes and interpreters.
- Test the negative case: compromise one test agent identity and confirm it cannot pull another agent's image, read its memory or invoke its runtime.
- Keep MemoryID values out of unnecessary images, but treat that as exposure reduction; every memory read and write still needs independent resource authorization.
1 additional consideration
Evidence and deployment boundary
Conclusion
Last updated: