# CVE-2026-16221: fastify fast-uri host confusion via backslash authority delimiter

Source: https://junglewise.ai/threats/cve-2026-16221-fastify-fast-uri-host-confusion-via-backslash-authority-delimiter  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-19. Updated: 2026-07-21  
License: CC BY 4.0 with a link back

CVE-2026-16221 · Severity: high · CVSS 7.5 · Published 2026-07-19

A vulnerability in the fast-uri library, a tool used for high-performance URL parsing in Node.js applications, could allow attackers to bypass security filters. By using a backslash in a URL, an attacker can trick the system into validating a safe-looking address while actually connecting to a malicious or restricted internal destination. This could lead to unauthorized access to internal services or sensitive cloud metadata.

Technologies: [fast-uri (npm)](https://junglewise.ai/threats/technologies/npm-fast-uri). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-16221 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-16221 being exploited in the wild.

**How severe is CVE-2026-16221?** High severity, with a CVSS score of 7.5, published 19 July 2026.

**Which products and versions are affected?** fast-uri (npm) SEMVER:introduced=2.3.1,fixed=2.4.3.

**Is there a fix for CVE-2026-16221?** Yes. fast-uri (npm): upgrade to 2.4.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-16221 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-16221?** Check whether you run fast-uri (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- fast-uri (npm): upgrade to 2.4.3 or later

  ```sh
  npm install fast-uri@2.4.3
  ```


## Technical details

The fast-uri library fails to recognize the literal backslash (U+005C) as an authority delimiter, whereas Node.js native WHATWG URL parsers (used in fetch and undici) normalize backslashes to forward slashes for special schemes like HTTP/HTTPS. This discrepancy creates an interpretation conflict (CWE-436). An attacker can craft a URL such as 'http://evil.com\@allowed.com' which fast-uri identifies as 'allowed.com', but Node.js clients interpret as 'evil.com'. This desync allows for Server-Side Request Forgery (SSRF) and bypasses for allowlists or redirect validations. The issue is fixed in versions 2.4.3, 3.1.4, and 4.1.1.

## Affected products

- fastify fast-uri >= 2.3.1, <= 2.4.2
- fastify fast-uri >= 3.0.0, <= 3.1.3
- fastify fast-uri >= 4.0.0, <= 4.1.0

## Identifiers

- CVE-2026-16221
- GHSA-v2hh-gcrm-f6hx

## Timeline

- 2026-07-19: disclosed
- 2026-07-21: advisory

## References

- [https://api.github.com/users/rampage0010](https://api.github.com/users/rampage0010)
- [https://github.com/rampage0010](https://github.com/rampage0010)
- [https://api.github.com/users/rampage0010/gists%7B/gist_id%7D](https://api.github.com/users/rampage0010/gists%7B/gist_id%7D)
- [https://api.github.com/users/rampage0010/repos](https://api.github.com/users/rampage0010/repos)
- [https://avatars.githubusercontent.com/u/65641631?v=4](https://avatars.githubusercontent.com/u/65641631?v=4)
- [https://api.github.com/users/rampage0010/events%7B/privacy%7D](https://api.github.com/users/rampage0010/events%7B/privacy%7D)

## Related threats

- [fast-uri vulnerable to scheme injection via an unescaped first-segment colon in suffix references](https://junglewise.ai/threats/cve-2026-110725-fast-uri-is-a-dependency-free-rfc-3986-uri-parser-and-serializer)
- [fast-uri URI scheme spoofing via percent-encoded scheme](https://junglewise.ai/threats/cve-2026-110306-fast-uri-is-a-dependency-free-rfc-3986-uri-parser-and-serializer)
- [fast-uri host confusion via unchecked WHATWG canonicalization](https://junglewise.ai/threats/cve-2026-110180-fast-uri-is-a-dependency-free-rfc-3986-uri-parser-and-serializer)
- [fast-uri vulnerable to improper path equivalence in relative reference normalization](https://junglewise.ai/threats/cve-2026-110095-fast-uri-is-a-dependency-free-rfc-3986-uri-parser-and-serializer)
- [fast-uri mailto header injection via percent-encoded field-name desynchronization](https://junglewise.ai/threats/cve-2026-86818-fast-uri-mailto-header-injection-via-percent-encoded-field-name)
