SiteShadow
Back to vulnerability library
Detected byCWE-aware static analysisPro

CWE-610 Externally Controlled Reference

Coverage: 4 rules in the SiteShadow rule registry target this CWE (registry v2.0.0). Regex 4 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 reference/target that is controlled by external input (URL, redirect target, file/resource identifier, host, bucket key). If attackers can choose "where you go" or "what you fetch/read", they can often turn it into SSRF, open redirects, or data access bypasses.

Why it matters

This can enable open redirects, SSRF, or data access abuse.

Safer examples

1) Use allowlists for destinations

Map user choices to known destinations rather than accepting raw URLs or resource names.

const destinations = { home: "/home", billing: "/billing" };
const key = destinations[req.query.to] ? req.query.to : "home";
res.redirect(destinations[key]);

2) If URLs are required, allowlist scheme + host

from urllib.parse import urlparse

u = urlparse(input_url)
if u.scheme not in ("https",):
    raise ValueError("Invalid scheme")
if u.hostname not in {"api.example.com"}:
    raise ValueError("Invalid host")

3) Enforce authorization on referenced resources

Even with "valid" references, check the caller is allowed to access the target resource.

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.