T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/titus-web.sh:34- Finding
Untrusted Web Content Can Trigger Arbitrary Server-Side Network Requests
- Content
View full analysis
/dev/null || true elif [[ "$jsfile" != http* ]]; then # Relative path curl -sL "${URL%/}/${jsfile}" -o "$TMPDIR/$(basename $jsfile)" 2>/dev/null || true else curl -sL "$jsfile" -o "$TMPDIR/$(basename $jsfile)" 2>/dev/null || true fi done fi ``` ### Technical Analysis The scanner extracts JavaScript resource locations from attacker-controlled HTML and passes absolute URLs directly to `curl`. It does not restrict the destination to the scanned origin, validate the URL scheme, resolve and reject private addresses, or limit redirects. The `-L` option follows redirects, so even an initially public URL can redirect the scanner to loopback, link-local, private, or otherwise restricted network services. Because the request originates from the scanner host, it inherits that host's network reachability. The behavior exceeds the minimum privileges needed to scan public website resources: same-origin resource collection would be sufficient by default. ### Attack Path 1. An operator scans a website controlled by an attacker. 2. The website returns HTML containing a script reference such as an absolute URL ending in `.js`. 3. The URL points directly to an internal service or to a public endpoint that redirects to one. 4. `titus-web.sh` invokes `curl -sL` without destination restrictions. 5. The scanner host requests t ...[truncated 755 chars]- Remediation
View remediation
