fast-uri vulnerable to host confusion via literal backslash authority delimiter (CVE-2026-16221)
The fast-uri library versions 2.3.1 through before 2.4.3, 3.0.0 through before 3.1.4, and 4.0.0 through before 4.1.1 do not treat a literal backslash as an authority delimiter in URLs. This causes a mismatch with Node.js's native WHATWG URL parser, which normalizes backslashes to forward slashes for certain schemes. As a result, host-based policies enforced using fast-uri can be bypassed, potentially allowing redirection or access to unintended hosts such as internal or cloud metadata endpoints. The vulnerability is fixed in versions 2.4.3, 3.1.4, and 4.1.1 of fast-uri. No workarounds exist other than upgrading.
AI Analysis
Technical Summary
fast-uri versions >=2.3.1 <2.4.3, >=3.0.0 <3.1.4, and >=4.0.0 <4.1.1 fail to treat a literal backslash (U+005C) as an authority delimiter in URLs, unlike Node.js's native WHATWG URL parser which normalizes backslashes to forward slashes for special schemes (http, https, ws, wss, ftp, file). This discrepancy leads to host confusion where fast-uri and Node.js extract different hosts from the same URL input. For example, the URL 'http://evil.com\@allowed.com' is parsed by fast-uri as host 'allowed.com' with userinfo 'evil.com\', but Node.js treats it as host 'evil.com' with path '/@allowed.com'. Applications relying on fast-uri for host-based policy enforcement (allowlists, denylists, SSRF filtering, redirect validation, proxy routing) can be bypassed, allowing attackers to redirect requests to unintended destinations including internal or cloud metadata endpoints. The issue is addressed by upgrading to fast-uri versions 2.4.3, 3.1.4, or 4.1.1.
Potential Impact
This vulnerability allows attackers to bypass host-based security policies enforced using fast-uri by exploiting differences in URL parsing between fast-uri and Node.js's native WHATWG URL parser. This can lead to unauthorized access or redirection to unintended hosts such as internal services or cloud metadata endpoints, potentially exposing sensitive information or enabling server-side request forgery (SSRF) attacks. The integrity of host validation and filtering mechanisms relying on fast-uri is compromised.
Mitigation Recommendations
Upgrade fast-uri to version 2.4.3, 3.1.4, or 4.1.1 or later. No workarounds are available. Applying the official patch is the only recommended mitigation.
fast-uri vulnerable to host confusion via literal backslash authority delimiter (CVE-2026-16221)
Description
The fast-uri library versions 2.3.1 through before 2.4.3, 3.0.0 through before 3.1.4, and 4.0.0 through before 4.1.1 do not treat a literal backslash as an authority delimiter in URLs. This causes a mismatch with Node.js's native WHATWG URL parser, which normalizes backslashes to forward slashes for certain schemes. As a result, host-based policies enforced using fast-uri can be bypassed, potentially allowing redirection or access to unintended hosts such as internal or cloud metadata endpoints. The vulnerability is fixed in versions 2.4.3, 3.1.4, and 4.1.1 of fast-uri. No workarounds exist other than upgrading.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
fast-uri versions >=2.3.1 <2.4.3, >=3.0.0 <3.1.4, and >=4.0.0 <4.1.1 fail to treat a literal backslash (U+005C) as an authority delimiter in URLs, unlike Node.js's native WHATWG URL parser which normalizes backslashes to forward slashes for special schemes (http, https, ws, wss, ftp, file). This discrepancy leads to host confusion where fast-uri and Node.js extract different hosts from the same URL input. For example, the URL 'http://evil.com\@allowed.com' is parsed by fast-uri as host 'allowed.com' with userinfo 'evil.com\', but Node.js treats it as host 'evil.com' with path '/@allowed.com'. Applications relying on fast-uri for host-based policy enforcement (allowlists, denylists, SSRF filtering, redirect validation, proxy routing) can be bypassed, allowing attackers to redirect requests to unintended destinations including internal or cloud metadata endpoints. The issue is addressed by upgrading to fast-uri versions 2.4.3, 3.1.4, or 4.1.1.
Potential Impact
This vulnerability allows attackers to bypass host-based security policies enforced using fast-uri by exploiting differences in URL parsing between fast-uri and Node.js's native WHATWG URL parser. This can lead to unauthorized access or redirection to unintended hosts such as internal services or cloud metadata endpoints, potentially exposing sensitive information or enabling server-side request forgery (SSRF) attacks. The integrity of host validation and filtering mechanisms relying on fast-uri is compromised.
Mitigation Recommendations
Upgrade fast-uri to version 2.4.3, 3.1.4, or 4.1.1 or later. No workarounds are available. Applying the official patch is the only recommended mitigation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-v2hh-gcrm-f6hx
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-16221"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a600a9d9c2644c7f8fdeea0
Added to database: 07/22/2026, 00:11:09 UTC
Last enriched: 07/22/2026, 00:36:48 UTC
Last updated: 07/22/2026, 03:47:17 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.