CVE-2026-12530: AWS Bedrock AgentCore SDK Command Injection – Exploit Details & Patch Guidance
A command injection vulnerability exists in the AWS Bedrock AgentCore Python SDK that allows authenticated users to execute arbitrary commands within the Code Interpreter sandbox by manipulating package name arguments. The vulnerability affects versions 1.1.3 through 1.6.0, and AWS has released version 1.6.1 to remediate the issue. An attacker with valid credentials could leverage this flaw to run malicious code with the privileges of the Code Interpreter environment.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.3 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
- Weaknesses (CWE)
- CWE-88
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-17 / 2026-06-22
NVD description (verbatim)
Improper neutralization of argument delimiters in the install_packages() method in AWS Bedrock AgentCore Python SDK versions >= 1.1.3 and < 1.6.1 might allow a remote authenticated user to execute arbitrary commands within the Code Interpreter sandbox via crafted package name arguments. To mitigate this issue, users should upgrade to version 1.6.1.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The install_packages() method in AWS Bedrock AgentCore Python SDK fails to properly neutralize argument delimiters in package name inputs (CWE-88: Argument Injection). This allows remote authenticated attackers to break out of the intended package installation context and execute arbitrary system commands within the Code Interpreter sandbox. The vulnerability requires user interaction (likely clicking or approving a malicious operation) and affects all versions from 1.1.3 up to but not including 1.6.1.
Business impact
Organizations using the AWS Bedrock AgentCore Python SDK for autonomous agent workloads face risk of unauthorized code execution within their agent environments. This could lead to exfiltration of sensitive data processed by agents, modification of agent behavior, lateral movement to other AWS resources if the Code Interpreter has inherited IAM permissions, and disruption of AI-driven applications relying on Bedrock agents. The impact is elevated for customers using agents in multi-tenant or shared compute scenarios.
Affected systems
AWS Bedrock AgentCore Python SDK versions 1.1.3 through 1.6.0 are affected. Organizations should audit their Python environments and dependency manifests to identify if this SDK is pinned to a vulnerable version. The vulnerability only impacts code paths that call install_packages() with user-controlled or insufficiently validated package name inputs.
Exploitability
Exploitation requires valid AWS credentials (authentication), user interaction to trigger the malicious operation, and knowledge of the install_packages() method signature. The attack surface is moderate: an attacker cannot exploit this unauthenticated or without some form of social engineering to prompt a user to install a crafted package. The network vector is straightforward, and the vulnerability does not require complex setup or privileged access to the underlying infrastructure.
Remediation
Upgrade AWS Bedrock AgentCore Python SDK to version 1.6.1 or later immediately. Review any agent implementations that dynamically construct package names from external input and implement input validation as a defense-in-depth measure. Consider restricting Code Interpreter sandbox permissions at the IAM level to limit the blast radius of command execution.
Patch guidance
Update the AWS Bedrock AgentCore Python SDK dependency to version 1.6.1 or higher. Verify the upgrade by checking the installed version with `pip show aws-bedrock-agentcore` and confirming it reports 1.6.1 or above. If using version pinning in requirements.txt or pyproject.toml, update the constraint from `==1.x.x` to `>=1.6.1`. Test in a non-production environment before rolling out to production agents. No breaking changes are documented between 1.6.0 and 1.6.1 based on AWS release notes; update with confidence.
Detection guidance
Monitor CloudTrail logs for install_packages() API calls originating from Bedrock agents, especially those with unusual package names containing special characters, semicolons, pipes, or backticks. Implement guardrails within agent definitions to whitelist allowed packages and reject dynamic package name construction. Use AWS Config rules to enforce SDK version compliance across your Bedrock agent deployments. Review Code Interpreter execution logs for anomalous system commands that don't correspond to legitimate agent workflows.
Why prioritize this
This vulnerability merits urgent patching due to its HIGH CVSS score (7.3), the authenticated but easily satisfied user-interaction requirement, and the broad reach of AWS Bedrock across organizations deploying AI agents. The combination of high confidentiality and integrity impact, relatively low complexity for an attacker with valid credentials, and the prevalence of dynamic agent workloads elevates risk. While not yet in CISA's KEV catalog, the technical severity and active exploitation likelihood justify immediate remediation.
Risk score, explained
The CVSS 3.1 score of 7.3 (HIGH) reflects: (1) Network-accessible attack vector—exploitable remotely; (2) Low attack complexity—no special conditions beyond authentication; (3) Low privilege requirement—only authenticated users, which may be internal developers or external partners; (4) User interaction required—a human must trigger the install_packages() call; (5) High confidentiality and integrity impact—code execution can read and modify data; (6) No availability impact—the vulnerability does not cause denial of service. The score does not account for organizational context; assess your own Code Interpreter sandbox permissions and agent user base to determine if risk is higher or lower.
Frequently asked questions
Can this vulnerability be exploited without valid AWS credentials?
No. The vulnerability requires authentication to the AWS Bedrock service. However, if an organization has granted broad IAM permissions to a large set of users or uses federated identity, the attack surface may be wider than expected. Verify who has bedrock:InvokeAgent or related permissions in your account.
Does updating to 1.6.1 require code changes or agent redeployment?
No. Version 1.6.1 is a drop-in replacement for vulnerable versions 1.1.3–1.6.0. Update the SDK in your Python environment and restart any running agents. No changes to agent definitions or invoke code are required.
How can I verify if our agents are using a vulnerable version?
Check your Python environment with `pip show aws-bedrock-agentcore` or inspect your requirements.txt/poetry.lock/pipenv files. If the version is between 1.1.3 and 1.6.0 inclusive, you are vulnerable. Use AWS Lambda layers or container image inspection if agents are deployed in managed environments.
What does 'improper neutralization of argument delimiters' mean in plain terms?
The install_packages() method treats package names as plain strings without escaping shell special characters. An attacker can inject characters like semicolons or pipes to run additional commands. For example, a package name like `legitimate-pkg; rm -rf /` would execute the destructive command after attempting to install the legitimate package.
This analysis is provided for informational purposes and does not constitute legal or professional security advice. SEC.co does not assume liability for the accuracy or timeliness of vulnerability information. Verify all facts, patch versions, and remediation steps against official AWS security advisories and vendor documentation. Exploit details and proof-of-concept code are not included in this report in accordance with responsible disclosure practices. Organizations should conduct their own risk assessment based on their specific use of AWS Bedrock and the Code Interpreter sandbox. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2024-52011HIGHCommand Injection in launch-editor via Malicious Filenames on Windows
- CVE-2026-11332HIGHAnsible-Core Arbitrary Code Execution via Role Injection
- CVE-2026-41013HIGHCloud Foundry Diego SMB Mount Input Validation Bypass (CVSS 8.1)
- CVE-2026-46529HIGHAtril Remote Code Execution via Malicious PDF Links
- CVE-2026-48116HIGHAnythingLLM Command Injection via Ripgrep Abuse
- CVE-2026-49373HIGHTeamCity Perforce RCE – Patch to 2026.1
- CVE-2026-52750HIGHGhidra Windows Command Injection via URL Annotation
- CVE-2026-47250MEDIUMmcp-server-kubernetes kubectl Argument Injection Privilege Escalation