fast-uri is vulnerable to Host Confusion
75
High Risk
The library decodes percent-encoded characters in the scheme component using the legacy global unescape() and reserializes them without validation. Input such as %2f%2fevil.example:/pwn parses with no authority, but normalize() and resolve() emit //evil.example:/pwn, which reparses with an externally chosen host, and encoded %0d%0a can inject carriage returns and line feeds. Applications normalizing untrusted URLs before redirects, allowlist checks, or outbound requests can be misdirected, and normalized values placed in headers risk injection. The fix validates the scheme against RFC 3986 grammar and stops the unsafe decoding in parse(), normalize(), and resolve().
You are affected if you are using a version that falls within the vulnerable range and your application parses, normalizes, or resolves untrusted or externally influenced URIs before redirects, allowlist checks, or outbound requests.
fast-uri is vulnerable to Host Confusion in versions 2.3.1 - 2.4.4, 3.0.0 - 3.1.5 and 4.0.0 - 4.1.2.
Upgrade the fast-uri library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant