eval() call detected
High
- Category
- Dangerous Code Execution
- Content
"None": None, "round": round, }} safe_globals["state"] = state result = eval(expression, safe_globals, {}) return bool(result), None except Exception as e: return False, str(e)- Confidence
- 98% confidence
- Finding
- The /assert endpoint accepts user-controlled expressions and evaluate_expression executes them with Python eval(). Although builtins are restricted, this still runs attacker-supplied Python code against live service data and is not a safe parser; sandbox escapes, denial of service via expensive expressions, and unintended object access are realistic risks. In this service context, exposing eval over an unauthenticated HTTP API materially increases danger.
