bedrock-agentcore is vulnerable to Command Injection
73
High Risk
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.
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.
bedrock-agentcore is vulnerable to Command Injection in versions 1.6.1 - 1.18.0.
Upgrade the bedrock-agentcore library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant