AWS Bedrock AgentCore SDK Flaw Enables Command Injection in Code Interpreter
Emerging Technology Risk · 2 sources · Updated 4mo ago · First seen Jul 23, 2026

AWS disclosed CVE-2026-16796, a high-severity command argument injection flaw in the Bedrock AgentCore Python SDK before version 1.18.1 that can let an authenticated user execute arbitrary commands inside the Code Interpreter sandbox. The issue affects the install_packages() function, where crafted Python package specifiers and improperly neutralized argument delimiters can be passed into a shell-backed pip install flow, resulting in CWE-88 command injection.
The vulnerability carries a CVSS v3.1 score of 7.3 and can expose sensitive data in the sandbox, including temporary files and environment tokens, with potential for further movement in weakly segmented environments. AWS said the fix in version 1.18.1 tightens validation for package inputs, including PEP 508 extras, and quotes package arguments with shlex.quote; users are advised to upgrade immediately to the patched release.
Why it matters
Impact assessment
CVE-2026-16796 affects organizations using the AWS Bedrock AgentCore Python SDK, specifically deployments that expose the Code Interpreter tool and allow authenticated users to trigger package installation. The immediate impact is arbitrary command execution inside the sandbox container, creating risk of data exposure, token theft, and follow-on internal reconnaissance where sandbox network segmentation is weak.
Severity and scope
- Affected product: AWS Bedrock AgentCore Python SDK (bedrock-agentcore)
- Affected versions: 1.6.0 and later before 1.18.1
- Patched version: 1.18.1
- Severity: High
- CVSS v3.1: 7.3
- CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
- Exposure scope: Limited to environments using the vulnerable SDK and the Code Interpreter package installation flow, but potentially broad across AI-enabled application stacks using Bedrock AgentCore
Business and operational impact
- Authenticated users can execute arbitrary commands inside the Code Interpreter sandbox container.
- Sensitive data in the sandbox may be exposed, including temporary files and environment tokens.
- Weakly segmented environments may permit lateral reconnaissance or access to adjacent internal services.
- Integrity risk is material because attacker-controlled commands run in the application execution context.
- Availability impact is not the primary concern based on the published CVSS vector.
Exploitation status
- Public disclosure occurred on 2026-07-23.
- PoC availability is reported.
- No confirmed in-the-wild exploitation is stated in the provided references.


