AWS patches Bedrock AgentCore SDK flaw allowing sandbox command injection
A remote authenticated user could run arbitrary commands in the Code Interpreter sandbox via crafted package names in older SDK versions.

Key points
- CVE-2026-16796 affects bedrock-agentcore versions prior to 1.18.1.
- The flaw involves improper neutralization of argument delimiters in install_packages().
- AWS released version 1.18.1 to fix the vulnerability and urges immediate upgrades.
AWS published bulletin 2026-065-AWS on July 23, 2026, disclosing CVE-2026-16796 in the Bedrock AgentCore Python SDK. The advisory states that a remote authenticated user could execute arbitrary commands within the Code Interpreter sandbox by supplying crafted package name arguments to the install_packages() method.
The vulnerability stems from improper neutralization of argument delimiters. This flaw exists in the SDK component that manages Python package installations inside the managed sandbox environment. AWS classifies the bulletin as important, indicating that it requires attention from developers using the affected library to prevent potential security breaches.
Context and Background
This issue impacts versions of bedrock-agentcore earlier than 1.18.1. The SDK provides tools for building AI agents, including a Code Interpreter client. As Threat Times reported on October 15, 2026, a previous flaw in version 1.5.1 leaked sensitive AI prompts to CloudWatch logs, highlighting ongoing scrutiny of this development kit’s security posture.
AWS thanked Sergio Garcia and BeyondTrust Phantom Labs for identifying the issue. They collaborated through the coordinated issue disclosure process to ensure a fix was developed before public announcement. The vendor addressed the problem in version 1.18.1, which users can now download to mitigate the risk.
Who Is Affected
Developers using bedrock-agentcore versions below 1.18.1 are vulnerable to this command injection flaw. Applications that accept dynamic package names from untrusted or model-generated input face the highest risk. If such input is passed directly to install_packages(), an attacker could potentially break out of the intended sandbox constraints.
AWS recommends upgrading to the latest version immediately. For environments that cannot upgrade, the vendor advises against passing untrusted input to the method. Developers must validate any dynamic package names against strict PyPI naming rules before calling the SDK to reduce exposure to this specific attack vector.
What should you do?
Users of the Bedrock AgentCore Python SDK should verify their current version number. If running a version lower than 1.18.1, they should upgrade to the latest release provided by AWS. This update contains the necessary patches to neutralize the argument delimiter flaw and secure the Code Interpreter sandbox environment.
What to do and how to stay safe: AWS
- Audit your Python dependencies to identify any use of bedrock-agentcore versions prior to 1.18.1.
- Upgrade to version 1.18.1 or later as soon as possible to apply the official vendor fix.
- If upgrading is not immediately feasible, implement strict input validation for any dynamic package names passed to install_packages().
- Ensure that any forked or derivative code is updated to incorporate the new security fixes provided by AWS.
Step-by-step guide: Risk-Based Vulnerability Management: Prioritize Fixes by Actual Danger
General security guidance from the Threat Times newsroom. It is not confirmed advice from the organisations named in this story.
Frequently asked questions
What is CVE-2026-16796?
It is an improper neutralization of argument delimiters in the AWS Bedrock AgentCore Python SDK that allows arbitrary command execution.
Which versions are affected?
All versions of bedrock-agentcore prior to 1.18.1 are impacted by this vulnerability.
Is there a fix available?
Yes, AWS released version 1.18.1 to address the issue and recommends upgrading immediately.


