Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-105812 Overview
CVE-2026-105812 is a code injection vulnerability [CWE-94] in the Amazon Bedrock AgentCore Starter Toolkit before version 0.3.14. The flaw resides in the agent import functionality, which incorporates configuration values into generated Python source code without safe literal encoding. An authenticated same-account actor can supply crafted configuration values that execute arbitrary Python code when a user imports and runs or deploys a Bedrock Agent. Because the injected code persists into generated source artifacts, upgrading the toolkit alone does not remediate previously imported agents.
Critical Impact
Arbitrary code execution within the context of users who import, run, or deploy a Bedrock Agent built with an affected version of the toolkit.
Affected Products
- Amazon Bedrock AgentCore Starter Toolkit versions prior to 0.3.14
- Python agents generated or imported using affected toolkit versions
- Local and deployed agent output artifacts produced before remediation
Discovery Timeline
- 2026-10-06 - CVE CVE-2026-105812 published to NVD
- 2026-10-07 - Last updated in NVD database
Technical Details for CVE-2026-105812
Vulnerability Analysis
The Amazon Bedrock AgentCore Starter Toolkit generates Python source files during the agent import workflow. Configuration values supplied by the importer are embedded directly into the generated code without using a safe literal encoding mechanism such as repr() or ast.literal_eval round-tripping. This allows a same-account actor with permission to influence configuration input to break out of string literals and inject arbitrary Python statements. The injected code executes when the generated agent is later run or deployed, inheriting the privileges of the executing user or deployment role.
The vulnerability is particularly concerning because the malicious payload is baked into persistent output artifacts. Replacing the toolkit does not sanitize already-generated files, which means impacted environments require both an upgrade and a full re-import of affected agents.
Root Cause
The root cause is improper control of generation of code [CWE-94]. The toolkit interpolates untrusted configuration values into Python source templates using unsafe string formatting rather than encoding them as validated Python literals. Characters such as quotes, newlines, and parentheses are not escaped, allowing injection of arbitrary expressions and statements into the generated module.
Attack Vector
Exploitation requires an authenticated same-account actor who can supply or modify configuration values consumed by the agent import flow. The attacker crafts a configuration value containing Python code that terminates the intended string literal and appends arbitrary statements. When a user runs bedrock-agentcore import tooling against the poisoned configuration and subsequently executes or deploys the agent, the injected code runs. User interaction is required: the targeted user must initiate the import and execute or deploy the resulting agent. Refer to the AWS Security Bulletin 2026-127 for authoritative technical details.
No verified public exploit code is available at the time of publication.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-105812
Indicators of Compromise
- Generated Python agent files containing unexpected imports, exec, eval, subprocess, or os.system calls near interpolated configuration values
- Agent configuration values containing quote characters, escape sequences, or newline control characters inconsistent with normal field semantics
- Unexpected outbound network connections or process spawning from Bedrock Agent runtimes shortly after an import or deploy action
Detection Strategies
- Perform static review of all Python artifacts generated by bedrock-agentcore-starter-toolkit versions prior to 0.3.14, looking for unquoted or improperly escaped configuration interpolation
- Diff generated agent source against freshly regenerated output from version 0.3.14 to identify embedded payloads
- Monitor CI/CD pipelines that build or deploy Bedrock Agents for anomalous build-time or deploy-time script execution
Monitoring Recommendations
- Enable CloudTrail logging for Bedrock Agent import, update, and deploy API calls and alert on unexpected principals
- Capture process and network telemetry from hosts and containers executing Bedrock Agents and baseline their expected behavior
- Alert on Python processes launched by Bedrock runtimes that spawn shells, package managers, or outbound sessions to non-approved destinations
How to Mitigate CVE-2026-105812
Immediate Actions Required
- Upgrade bedrock-agentcore-starter-toolkit to version 0.3.14 or later across all developer, build, and deployment environments
- Re-import every agent previously processed with an affected toolkit version using the fixed release
- Replace all local and deployed output artifacts generated by vulnerable toolkit versions; do not reuse existing files
- Audit account access to Bedrock Agent configuration sources and restrict write permissions to trusted principals
Patch Information
AWS fixed the vulnerability in version 0.3.14 of the Amazon Bedrock AgentCore Starter Toolkit, available via PyPI Bedrock Toolkit Release 0.3.14. Because the vulnerability persists in generated source, patching the toolkit is necessary but not sufficient. Follow the full remediation guidance in AWS Security Bulletin 2026-127.
Workarounds
- Restrict who can author or modify agent configuration values that feed the import process
- Review and sanitize configuration inputs before running the import tool, rejecting values containing Python control characters
- Execute agent import and build operations inside ephemeral, least-privilege environments to limit blast radius if injection occurs
# Upgrade the toolkit and re-import affected agents
pip install --upgrade 'bedrock-agentcore-starter-toolkit>=0.3.14'
# Verify installed version
pip show bedrock-agentcore-starter-toolkit | grep Version
# Re-import each affected agent and replace prior output artifacts
# (Repeat for every agent generated with a vulnerable toolkit version)
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

