Data exfiltration
highContextual riskmedium confidenceThe safeFetch SSRF guard only recognizes dotted-quad IPv4-mapped IPv6 addresses, but URL parsing normalizes them to hex form (::ffff:7f00:1), so a user-supplied url could reach loopback or cloud-metadata hosts and have the response published publicly.
const mapped = lower.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/);
Counter-argument considered
The SSRF bypass is real. WHATWG URL parsing normalizes http://[::ffff:127.0.0.1]/ to the hex form ::ffff:7f00:1, which the dotted-quad regex does not match. isBlockedIp then returns false, so loopback and metadata addresses pass the guard. This contradicts the guard's stated purpose, and the response is published publicly.