SiteShadow
Back to vulnerability library
Detected byCWE-aware static analysisPro

CWE-89 SQL Injection

Coverage: 98 rules in the SiteShadow rule registry target this CWE (registry v2.0.0). Regex 98 Also: Taint and heuristic analyzers may also detect related flows (see coverage for the authoritative list) Registry tagging shows intent, for sample-level behaviour and benchmarked gaps see known gaps.

What this means

SiteShadow flagged code that builds SQL using untrusted input without parameterization (string concatenation, interpolation, .format(), template literals, etc.).

Why it matters

Safer examples

1) Use parameterized queries (Python)

cursor.execute("SELECT * FROM users WHERE email = %s", (email,))

2) Use parameterized queries (Node / pg)

await client.query("SELECT * FROM users WHERE email = $1", [email]);

3) If you must build dynamic SQL, only use allowlisted fragments

allowed = {"created_at", "email"}
order_by = order_by if order_by in allowed else "created_at"
sql = f"SELECT * FROM users ORDER BY {order_by} DESC"
cursor.execute(sql)  # only allowlisted identifiers are interpolated

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Catch this with SiteShadow Pro.

This vulnerability class is detected by SiteShadow's Pro-tier engines, two-pass interprocedural taint analysis, heuristic flow checks, AI-context scanning, and cross-file detection. The free tier catches OWASP Top 10 single-file patterns; Pro adds the data-flow depth that finds this class of bug.