SiteShadow
Back to vulnerability library

CWE-610 Externally Controlled Reference

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

Request access View coverage