Intel

AIKIDO-2026-715792

bedrock-agentcore is vulnerable to Command Injection

Command Injection Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Today

73

High Risk

This Affects:

PYTHONbedrock-agentcore
1.6.1 - 1.18.0
Fixed in 1.18.1
Are you affected? Scan for Free

TL;DR

The install_packages() method of the Code Interpreter client builds a pip install shell command from caller-supplied package specifiers. Its allowlist regex permits arbitrary characters inside the extras brackets and the package arguments are not shell-quoted, so a specifier such as requests[$(id)] passes validation and is interpreted by the shell. A remote authenticated user who can influence the package strings passed to the method can execute arbitrary commands within the Code Interpreter sandbox. The fix restricts the extras group to valid extra-name characters and quotes each package argument with shlex.quote before constructing the command.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and pass externally-influenced package specifiers to the install_packages() method.

Background info

bedrock-agentcore is vulnerable to Command Injection in versions 1.6.1 - 1.18.0.

How to fix this

Upgrade the bedrock-agentcore library to the patch version.