CVE-2026-13676: fastify fast-uri host confusion via failed IDN canonicalization

CVE-2026-13676 · Severity: high · CVSS 7.5 · Published 2026-06-29

fast-uri is a library used to parse and validate URLs in Node.js applications. A flaw in how it handles international domain names (IDN) causes it to fail converting Unicode hostnames to their ASCII equivalents, leaving them in their original form. This creates a mismatch: when applications use fast-uri to enforce host-based security policies (like blocking loopback addresses or enforcing allow-lists), an attacker can bypass these checks by submitting URLs with visually similar Unicode characters that fast-uri accepts but that Node's URL parser converts to standard ASCII, leading to unintended destinations and policy bypass.

Technologies: fast-uri (npm). Vendors: npm.

Quick answers

Is CVE-2026-13676 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-13676 being exploited in the wild.
How severe is CVE-2026-13676?
High severity, with a CVSS score of 7.5, published 29 June 2026.
Which products and versions are affected?
fast-uri (npm) SEMVER:introduced=4.0.0,fixed=4.0.1.
Is there a fix for CVE-2026-13676?
Yes. fast-uri (npm): upgrade to 4.0.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-13676 attacked?
It is attacked over the network.
Am I affected by CVE-2026-13676?
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 4.0.1 or later
    npm install fast-uri@4.0.1

Technical details

The vulnerability is an interpretation conflict (CWE-436) in fast-uri's IDN canonicalization logic. When parsing HTTP URLs with Unicode/IDN hostnames, fast-uri attempts to call URL.domainToASCII() on the global WHATWG URL constructor; however, this method does not exist globally, resulting in a TypeError. The error is silently caught and stored in parsed.error, but the parse(), normalize(), and equal() functions return with the host left uncanonicalized in its original Unicode form. This causes a semantic desynchronization: fast-uri treats http://127。0。0。1/ (with fullwidth periods) as host "127。0。0。1", while Node's native WHATWG URL parser and fetch() canonicalize the same input to "127.0.0.1". Applications relying on fast-uri for host-based access control (denylists, loopback filtering, redirect validation, outbound proxy routing) before passing URLs to Node's URL or fetch() consumers are vulnerable to policy bypass. The vulnerability affects versions >=2.3.1 and <=4.0.0. Patches are available in v2.4.2, v3.1.3, and v4.0.1, which fix the issue by using WHATWG URL hostname parsing instead of the non-existent domainToASCII helper.

Affected products

  • Fastify fast-uri >=2.3.1, <=4.0.0 (unfixed); 2.4.2, 3.1.3, 4.0.1 (patched)

Identifiers

  • CVE-2026-13676
  • GHSA-4c8g-83qw-93j6

Timeline

  • 2026-06-29: disclosed
  • 2026-07-21: advisory
  • 2026-07-17: patched: v2.4.2, v3.1.3, v4.0.1 released

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.