CVE-2026-11393: Code Injection via Improper Triple-Quote Escaping in AWS AgentCore CLI
Vulnerability ID: CVE-2026-11393
CVSS Score: 9.0
Published: 2026-07-29
A critical code injection vulnerability exists in @aws/agentcore CLI (AWS AgentCore CLI) during the Bedrock Agent import lifecycle. An authenticated remote attacker with permissions to configure Bedrock collaborator attributes can inject python code by embedding triple-double-quotes (""") inside the collaborationInstruction metadata field. The CLI formats this metadata directly into a Python docstring in a generated main.py file without adequate escaping, leading to arbitrary code execution when the imported agent is run or deployed.
TL;DR
Improper validation of triple-double-quotes in AWS AgentCore CLI's Bedrock Agent import allows remote code execution when local or cloud environments execute generated code.
⚠️ Exploit Status: POC
Technical Details
- CWE ID: CWE-94
- Attack Vector: Network (Low Privileges Required)
- CVSS v3.1: 9.0 (Critical)
- EPSS Score: 0.00322
- Impact: Arbitrary Code Execution
- Exploit Status: Proof-of-Concept
- KEV Status: Not Listed
Affected Systems
- @aws/agentcore CLI
- Amazon Bedrock Agent Import Lifecycle
-
@aws/agentcore (Stable): >= 0.4.0 to <= 0.14.1 (Fixed in:
0.14.2) -
@aws/agentcore (Preview): >= 0.3.0-preview.7.0 to <= 1.0.0-preview.8 (Fixed in:
1.0.0-preview.9)
Code Analysis
Commit: ae1b932
fix(import): escape triple-quotes in collaborationInstruction to prevent docstring injection
Exploit Details
- GitHub Security Advisory: Public disclosure and code analysis outlining the escape pattern.
Mitigation Strategies
- Upgrade
@aws/agentcoreto version 0.14.2 (stable) or 1.0.0-preview.9 (preview) - Restrict IAM permissions for Bedrock Agent configuration updates
- Perform code reviews of generated
main.pyfiles prior to execution
Remediation Steps:
- Identify active installations of @aws/agentcore CLI
- Execute 'npm install -g @aws/agentcore@0.14.2' or upgrade the local package dependency
- Scan local python files for unescaped triple quotes inside 'collaboratorInstruction'
- Audit CloudTrail logs for bedrock-agent:UpdateAgentCollaborator events
References
- https://aws.amazon.com/security/security-bulletins/2026-040-aws/
- https://github.com/aws/agentcore-cli/security/advisories/GHSA-m4x6-gwgp-4pm7
- https://nvd.nist.gov/vuln/detail/CVE-2026-11393
- https://www.cve.org/CVERecord?id=CVE-2026-11393
- https://github.com/aws/agentcore-cli/pull/1329
- https://github.com/aws/agentcore-cli/commit/ae1b932ec91bacdbb7a3521f9f1fc24479a3d504
- https://github.com/aws/agentcore-cli/releases/tag/v0.14.2
- https://www.npmjs.com/package/@aws/agentcore/v/0.14.2
- https://www.npmjs.com/package/@aws/agentcore/v/1.0.0-preview.9
Read the full report for CVE-2026-11393 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)