T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/utils/validator.js:3- Finding
Arbitrary URL Fetching Enables SSRF and External Exfiltration
- Content
View full analysis
this.__opts.maxRedirects) { const err = new Error("Too many redirects"); this.__setState(this.__states.FAILED); this.emit("error", err); return reject(err); } const redirectedURL = /^https?:\/\//.test(response.headers.location) ? response.headers.location : new URL(response.headers.location, this.url).href; this.__isRedirected = true; this.__initProtocol(redirectedURL); this.emit("redirected", redirectedURL, this.url); return this.__start(); ``` ### Technical Analysis URL validation checks only whether the scheme is HTTP or HTTPS. It does not reject: - Loopback destinations such as `127.0.0.1` or `[::1]` - RFC1918 private networks - Link-local addresses, including cloud metadata services - Reserved or multicast address ranges - Hostnames that resolve to private addresses - Public URLs that redirect to private destinations - DNS rebinding between validation an ...[truncated 1831 chars]- Remediation
View remediation
