eval() call detected
High
- Category
- Dangerous Code Execution
- Content
"pi": math.pi, "e": math.e, } result = eval(expression, {"__builtins__": {}}, allowed_names) return json.dumps({ "expression": expression, "result": result,- Confidence
- 98% confidence
- Finding
- The calculator tool evaluates attacker-controlled input with Python's eval(). Although __builtins__ is stripped and a small allowlist is provided, eval remains an unsafe parser for untrusted expressions and can often be abused through object/model internals or future code changes that widen the attack surface. In an agent setting, this is especially risky because model-generated tool inputs are not trustworthy.
