SiteShadow
Back to vulnerability library
Detected byCWE-aware static analysisPro

CWE-472 External Control of Assumed-Immutable Data

Coverage: 6 rules in the SiteShadow rule registry target this CWE (registry v2.0.0). Regex 6 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 a pattern where the code assumes some value cannot be changed (immutable), but it is actually controlled externally (client input, request headers, environment, query params, cached objects that can be mutated).

Why it matters

Assumptions about immutability can be violated and exploited.

Safer examples

1) Treat client-controlled data as mutable and untrusted

Re-validate sensitive values at the point of use, not only at parse time.

2) Copy/normalize values you rely on

Don't keep references to mutable objects you don't control; copy required fields into a validated structure.

3) Use server-side source of truth

Look up roles, plans, prices, and permissions from the server/database, not from client payloads.

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.