CVE-2026-16796: Command Argument Injection in AWS Bedrock AgentCore Python SDK
- Vendor
- Amazon Web Services
CVE-2026-16796 is an argument injection vulnerability in the install_packages() method of the AWS Bedrock AgentCore Python SDK before version 1.18.1. Insufficient validation of Python package extras allows shell metacharacters embedded within bracketed extras specifiers to pass package-name validation. The helper incorporates these attacker-controlled strings into a shell-based pip installation command without adequate argument quoting, allowing shell evaluation before pip executes. A remote authenticated user who can influence package arguments can execute arbitrary commands within the Code Interpreter sandbox. The vulnerability does not bypass Firecracker isolation or directly compromise the underlying host.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation compromises the confidentiality and integrity of the affected Code Interpreter session through arbitrary command execution. An attacker can access or exfiltrate session data, temporary files, and environment tokens available within the sandbox. If a custom Code Interpreter has an execution role, the attacker may obtain its temporary AWS credentials and access other AWS services within that role's IAM permissions. Additional network access depends on the sandbox's connectivity and network controls; Firecracker isolation remains intact.
Mitigation
If you can’t patch tonight, do this now.
Until patched, prevent untrusted or model-generated package names from reaching install_packages(). If dynamic package selection is necessary, enforce strict package-name validation or an explicit allowlist, restricting extras to comma-separated valid identifiers and rejecting shell metacharacters. Omit Code Interpreter execution roles when AWS access is unnecessary and tightly scope IAM permissions when a role is required. Restrict sandbox network egress and monitor package-installation and Code Interpreter activity for suspicious syntax or unexpected behavior.
Remediation
Patch, then assume compromise.
Upgrade the bedrock-agentcore Python package to version 1.18.1 or later. Apply the corresponding fix to any forked or derivative implementations. The patch restricts permitted characters within package extras and uses shlex.quote() to quote individual package arguments before constructing the installation command.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-16796 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2026-16796 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-16796?
- As of Oct 16, 2026, Mallory has found no public exploit for CVE-2026-16796.
- Is there a patch for CVE-2026-16796?
- Upgrade the bedrock-agentcore Python package to version 1.18.1 or later. Apply the corresponding fix to any forked or derivative implementations.
- What products are affected by CVE-2026-16796?
- Amazon Web Services Bedrock-Agentcore 1.18.1.
- How severe is CVE-2026-16796?
- CVE-2026-16796 has a CVSS v4 score of 8.4 (High) and an EPSS score of 0.73% (50th percentile) as of Oct 16, 2026.
Recent activity
9 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.