AWS patches Bedrock AgentCore SDK flaw allowing sandbox command injection
AWS released version 1.6.1 to fix CVE-2026-12530, which let attackers bypass validation in the Code Interpreter sandbox via crafted package names.

Key points
- AWS Bedrock AgentCore Python SDK versions 1.1.3 through 1.6.0 are vulnerable to command injection.
- Attackers could use pip flags to redirect package sources or read arbitrary sandbox files.
- The fix is available in version 1.6.1, released on June 17, 2026.
AWS released a security patch on June 17, 2026, for the Bedrock AgentCore Python SDK to address a command injection vulnerability. The update, version 1.6.1, fixes CVE-2026-12530 in the Code Interpreter client’s install method. This flaw allowed crafted package name arguments to bypass validation within the sandbox environment.
The vulnerability stemmed from an incomplete blocklist used to sanitize package name arguments. According to the AWS security bulletin, the install_packages() method failed to properly neutralize argument delimiters before constructing shell commands. Attackers could craft package names that bypassed validation, injecting malicious flags into the pip install process.
Technical details of the flaw
AWS identified that specific pip flags could be exploited to compromise the sandbox integrity. The most critical risk involved the --index-url flag, which allowed attackers to redirect package resolution to a third-party PyPI server. This redirection could force the installation of packages from attacker-controlled sources.
Another exploitable vector was the -r flag. By using this flag, an attacker could instruct pip to read arbitrary files within the sandbox. This behavior could expose sensitive data or configuration files that should have remained isolated. The issue was reported by Sergio Garcia through the coordinated vulnerability disclosure process.
Affected versions and scope
The security bulletin states that AWS Bedrock AgentCore Python SDK versions greater than or equal to 1.1.3 and less than 1.6.1 are impacted. This range covers multiple releases of the open-source SDK used to build and manage agents on AWS Bedrock. Developers using any version in this window must upgrade to mitigate the risk.
This incident follows previous security issues in the same SDK. As this publication reported on October 15, 2026, AWS patched two other flaws in the Bedrock AgentCore SDK. One allowed sandbox command injection via older versions, while the other exposed sensitive AI prompts in CloudWatch logs. The current patch addresses a distinct but related input validation weakness.
What should you do?
AWS recommends upgrading to bedrock-agentcore version 1.6.1 immediately. Users should ensure that any forked or derivative code incorporates the new fixes. If an immediate upgrade is not possible, administrators should restrict calls to install_packages().
Organizations unable to patch right away should avoid passing user-supplied strings to the function. Instead, restrict package installations to a fixed, hardcoded list of approved names within application code. This mitigation prevents external inputs from influencing the command structure.
Background: Coordinated vulnerability disclosure
Coordinated vulnerability disclosure reveals software flaws to vendors before public release. Small teams must patch during this quiet period. Monitor vendor security pages, prioritize critical updates, and verify that your IT provider tracks these disclosures to prevent exploitation of known weaknesses before public patches arrive.
Read the full guide: Coordinated Vulnerability Disclosure for Small Teams
What to do and how to stay safe: AWS
- Update the bedrock-agentcore Python package to version 1.6.1 or later to apply the official fix.
- Audit application code for any instances where user input is passed directly to the install_packages() method.
- Implement a strict allowlist of approved package names if immediate patching is not feasible for your environment.
- Monitor sandbox activity for unexpected pip commands or connections to unauthorized package repositories.
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
Which versions of the Bedrock AgentCore SDK are vulnerable to CVE-2026-12530?
Versions greater than or equal to 1.1.3 and less than 1.6.1 are affected by this command injection flaw.
How can an attacker exploit this vulnerability?
Attackers can craft package names that bypass validation to inject pip flags like --index-url or -r.
Is there a fix available for this issue?
Yes, AWS released version 1.6.1 on June 17, 2026, which addresses the improper neutralization of argument delimiters.


