strands-agents-tools is vulnerable to Code Injection
75
CVE Score
High
Code Injection
The calculator tool validates expressions against an AST allowlist that is meant to permit only mathematical syntax and block code execution. String literals were still allowed as arguments, and several SymPy helpers reachable in the evaluation namespace (for example N, simplify, solve) re-parse string arguments through sympify, which evaluates them with full builtins and escapes the restricted namespace used for the top-level expression. An expression such as N("__import__('os').system('id')") therefore executed arbitrary code despite the allowlist. The fix rejects string literals except as positional arguments to a small allowlist of safe constructors (Symbol, symbols, Rational, Integer, Float).
Upgrade the strands-agents-tools library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and use the calculator tool.
0.6.0 - 0.8.2
Fixed in 0.8.3strands-agents-tools is vulnerable to Code Injection in versions 0.6.0 - 0.8.2.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.