Executive Summary
Unit 42 researchers discovered a critical security vulnerability in AWS AgentCore Harness where default configurations allow attackers to exploit prompt injection techniques to exfiltrate plaintext credentials from AgentCore Identity vaults. The research demonstrated how the built-in shell tool, enabled by default and running with root privileges, can access the same memory space where credentials are resolved to plaintext. Through indirect prompt injection, attackers can execute arbitrary commands, scan process memory, and extract JWT tokens and service account credentials that provide unauthorized access to downstream MCP servers containing sensitive customer data including PII. AWS classified this as informative under their shared responsibility model, emphasizing that operators must implement proper allowedTools scoping and egress filtering controls.
This incident highlights the emerging security challenges as AI agents become more autonomous and powerful, particularly around prompt injection attacks that can now leverage programmatic tool access to bypass traditional security boundaries and access privileged credentials in managed runtime environments.
Why This Matters Now
As organizations rapidly adopt AI agents with expanded autonomy and tool access, the attack surface for prompt injection has evolved from simple text manipulation to credential theft and privilege escalation, requiring immediate reassessment of AI security controls.
Attack Path Analysis
Attackers used prompt injection against an AWS AgentCore Harness agent to execute arbitrary shell commands with root privileges, accessed the harness runtime memory to extract plaintext JWT credentials from the AgentCore Identity vault, and exfiltrated service account tokens to external endpoints for unauthorized access to downstream MCP servers containing customer PII.
Kill Chain Progression
This analysis maps confirmed threat intelligence to the full cloud kill chain to show where defensive gaps would emerge as an attack progresses.
Initial Compromise
Description
Attacker embedded malicious prompt injection in HTML comments within support tickets, exploiting the default-enabled shell tool in AgentCore Harness to execute arbitrary commands with root privileges
MITRE ATT&CK® Techniques
Process Hollowing
Proc Filesystem
Spearphishing Attachment
Unix Shell
Setuid and Setgid
Credentials In Files
Exfiltration Over C2 Channel
Cloud Accounts
Potential Compliance Exposure
Mapping incident impact across multiple compliance frameworks.
PCI DSS 4.0 – Authentication Factors for Service Providers
Control ID: 8.2.1
NYDFS 23 NYCRR 500 – Penetration Testing
Control ID: 500.15
DORA – Identification and Classification of ICT Risk
Control ID: Article 8
CISA ZTMM 2.0 – Cybersecurity Roles and Responsibilities
Control ID: ID.AM-6
NIS2 Directive – Cybersecurity Risk Management Measures
Control ID: Article 21
ISO 27001:2022 – Management of Privileged Access Rights
Control ID: A.9.2.3
Sector Implications
Industry-specific impact of the vulnerabilities, including operational, regulatory, and cloud security risks.
Information Technology/IT
AWS AgentCore Harness cloud misconfigurations enable prompt injection attacks to exfiltrate plaintext credentials from identity vaults, compromising AI agent security.
Computer Software/Engineering
Default shell tool configurations in AI agent harnesses allow privilege escalation and credential theft through memory access vulnerabilities.
Financial Services
Cloud identity vault compromises expose customer PII and authentication tokens, violating HIPAA and PCI compliance requirements for financial institutions.
Health Care / Life Sciences
Agentic AI systems processing patient data face exfiltration risks through cloud misconfigurations, threatening HIPAA compliance and patient privacy.
Sources
- A Vault with a Heap-View: The Uncomfortable Space Between AgentCore Harness and Identityhttps://unit42.paloaltonetworks.com/securing-aws-agentcore-harness-credentials/Verified
- Amazon Bedrock AgentCore Developer Guide - Harness Toolshttps://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-tools.htmlVerified
- Amazon Bedrock AgentCore Developer Guide - Identity and Credential Managementhttps://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/identity.htmlVerified
- Amazon Bedrock AgentCore Developer Guide - Harness Overviewhttps://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness.htmlVerified
Frequently Asked Questions
Cloud Native Security Fabric Mitigations and ControlsCNSF
Based on the attack progression modeled above, these are the defensive controls that would constrain each stage.
Aviatrix Zero Trust CNSF would have constrained this AgentCore Harness exploitation by limiting lateral movement paths and controlling egress communications. The segmented architecture could have reduced the attacker's ability to access downstream MCP servers and exfiltrate customer PII.
Control: Cloud Native Security Fabric (CNSF)
Mitigation: Zero trust fabric monitoring could have flagged unusual execution patterns from the AgentCore Harness agent, potentially limiting the scope of arbitrary command execution through behavioral analysis
Control: Zero Trust Segmentation
Mitigation: Workload isolation policies would likely constrain the blast radius of root-level access, limiting what system resources and network paths the compromised harness could reach
Control: East-West Traffic Security
Mitigation: Micro-segmentation controls could have limited the harness's ability to communicate with identity services and downstream systems, constraining credential discovery and usage pathways
Control: Multicloud Visibility & Control
Mitigation: Enhanced visibility into cross-cloud communications may have detected unusual curl patterns and memory scanning activities, reducing the attacker's ability to maintain persistent reconnaissance unnoticed
Control: Egress Security & Policy Enforcement
Mitigation: Egress filtering policies would likely have blocked unauthorized HTTP POST transmissions to external webhook endpoints, constraining the attacker's ability to exfiltrate JWT credentials and MCP server information
Despite segmentation controls, residual risk would remain for any credentials successfully exfiltrated before egress blocking, though the scope of accessible MCP servers would likely be constrained
Impact at a Glance
Affected Business Functions
- Customer Support Operations
- AI Agent Services
- Cloud Identity Management
- Downstream Service Integration
Estimated downtime: N/A
Estimated loss: N/A
Potential exposure of AWS AgentCore Identity vault credentials including JWT tokens for service accounts, MCP server authentication tokens, and access to downstream services containing PII such as customer names, phone numbers, and partial Social Security numbers. The research demonstrated successful exfiltration of service account credentials with replay capabilities from external networks.
Recommended Actions
Key Takeaways & Next Steps
- • Implement Zero Trust Segmentation to isolate AI agent runtime environments from credential stores and downstream services using identity-based policies
- • Deploy Egress Security & Policy Enforcement to block unauthorized outbound connections from agent containers to external webhook endpoints
- • Enable Multicloud Visibility & Control to monitor anomalous interactions between AI agents and detect suspicious automation patterns in real-time
- • Apply East-West Traffic Security controls to prevent lateral movement between agent runtime processes and credential vault services
- • Establish Cloud Native Security Fabric (CNSF) inline enforcement to detect and block prompt injection attempts targeting agentic AI systems



