SiteShadow
Back to vulnerability library

CWE-95 Eval Injection

What this means

SiteShadow flagged code that evaluates untrusted input using an "eval-like" mechanism (direct eval, expression evaluation, dynamic language execution).

Why it matters

Eval injection can lead to arbitrary code execution.

Safer examples

1) Don't eval user input

# Bad: eval(user_expr)
# Good: parse a known format and validate
n = int(user_input)

2) Use allowlists for supported operations

If you need "expressions," implement a tiny allowlisted parser rather than eval.

3) Isolate high-risk evaluation

If evaluation is unavoidable, sandbox it aggressively and remove access to filesystem/network (still risky).

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Request access View coverage