CVE-2026-16221: fast-uri vulnerable to host confusion via literal backslash authority delimiter
Impact fast-uri v4.1.0 and earlier do not treat a literal backslash (U+005C) as an authority delimiter. Node's native WHATWG URL (used by fetch(), undici, and Node's http/https clients) normalizes \ to / for special schemes (http, https, ws, wss, ftp, file), so the two parsers extract different hosts from the same input string.
Published Jul 21, 2026
Affected packages
fast-uri
- Ecosystem
- npm
- Affected
- >= 2.3.1, <= 2.4.2
- Fixed in
- 2.4.3
- Check
npm ls fast-uri
fast-uri
- Ecosystem
- npm
- Affected
- >= 3.0.0, <= 3.1.3
- Fixed in
- 3.1.4
- Check
npm ls fast-uri
fast-uri
- Ecosystem
- npm
- Affected
- >= 4.0.0, <= 4.1.0
- Fixed in
- 4.1.1
- Check
npm ls fast-uri
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
fast-uri v4.1.0 and earlier do not treat a literal backslash (U+005C) as an authority delimiter. Node's native WHATWG URL (used by fetch(), undici, and Node's http/https clients) normalizes \ to / for special schemes (http, https, ws, wss, ftp, file), so the two parsers extract different hosts from the same input string.
For example, http://evil.com\@allowed.com is treated by fast-uri as host allowed.com with userinfo evil.com\, while Node's WHATWG URL parser and fetch() see host evil.com with path /@allowed.com.
Applications that use fast-uri to enforce host-based policy (allowlists, denylists, loopback/SSRF filtering, redirect validation, outbound proxy routing) before passing the same URL into Node's URL or fetch() consumers see a policy/use desync and can be steered to an unintended destination, including cloud metadata endpoints, loopback, or internal hosts.
Patches
Upgrade to fast-uri v4.1.1, v3.1.4, or v2.4.3.
Workarounds
None. Upgrade to the patched version.
Credited to rampage0010, mcollina, UlisesGascon.
References
- https://github.com/fastify/fast-uri/security/advisories/GHSA-v2hh-gcrm-f6hx
- https://nvd.nist.gov/vuln/detail/CVE-2026-16221
- https://github.com/fastify/fast-uri/commit/0542a216860fd70c062a4730e620576f62ded057
- https://github.com/fastify/fast-uri/commit/2d50fbabc80e4d0884fe0f6a98fe118ce6faa353
- https://github.com/fastify/fast-uri/commit/9438266d6a7ded688c8bc7c4ba506da17f44a17b
- https://cna.openjsf.org/security-advisories.html
- https://github.com/fastify/fast-uri/releases/tag/v2.4.3
- https://github.com/fastify/fast-uri/releases/tag/v3.1.4
- https://github.com/fastify/fast-uri/releases/tag/v4.1.1
- https://github.com/advisories/GHSA-v2hh-gcrm-f6hx
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-110095
fast-uri vulnerable to improper path equivalence in relative reference normalization
low3.7Oct 23, 2026CVE-2026-110180
fast-uri vulnerable to host confusion via unchecked WHATWG host canonicalization
medium4.8Oct 23, 2026CVE-2026-110306
fast-uri vulnerable to URI scheme spoofing via percent-encoded scheme decoding
medium6.1Oct 23, 2026CVE-2026-110725
fast-uri vulnerable to scheme injection via an unescaped first-segment colon in suffix references
low3.7Oct 23, 2026CVE-2026-86472
fast-uri vulnerable to inconsistent host case normalization via percent-encoded octets
medium4.8Sep 29, 2026CVE-2026-86818
fast-uri vulnerable to mailto header injection via percent-encoded field-name desynchronization
medium4.8Sep 29, 2026
