/

CVE-2026-75899

Severity:

HIGH RISK

(7.5)

Double-Decoding (CWE-174) in fast-uri Node.js Parser

CVE-2026-75899

Analyzed

Vulnerability type

Category:

Double Decoding

CWE:

CWE-174, CWE-918

Impact:

Server-Side Request Forgery and Host-Policy Bypass

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

fast-uri may decode percent-encoded hostname data more than once while parsing and recomposing a URI. When an application normalizes or resolves an untrusted HTTP-family URI before routing, redirect validation, or host-policy enforcement, the final destination may differ from the originally represented host, enabling server-side request forgery or policy bypass.

Affected context

The issue occurs in fast-uri versions whose hostname parsing and authority recomposition perform repeated percent-decoding. It becomes risky when an application accepts untrusted URIs and uses fast-uri normalization or resolution before making outbound requests, validating redirects, or applying allowlists and network-boundary policies. The affected release ranges include 2.4.1 through versions before 2.4.5, 3.1.2 through versions before 3.1.6, and 4.0.0 through versions before 4.1.3.

Exploit preconditions

  • Attack surface: An application-facing URI parser or resolver used for outbound HTTP-family requests
  • Required access: Ability to supply or influence a URI processed by the application
  • Trigger point: Hostname decoding during URI normalization, resolution, or authority recomposition
  • Why exploitation is possible: The parser may decode nested percent escapes more than once, causing the effective destination to differ from the value evaluated by validation or policy logic

Why this happens

The vulnerability is caused by repeated decoding of percent-encoded hostname data during separate parsing and recomposition stages. RFC 3986 requires percent-encoded data to be decoded only when the resulting representation is used and prohibits decoding the same string more than once. This behavior maps primarily to CWE-174: Improper Handling of Additional Special Characters in Output, because a second decoding pass changes the semantic meaning of previously encoded data. It also enables CWE-918: Server-Side Request Forgery when the resulting host is used for server-side network access.

Potential impact

  • An attacker may redirect server-side requests to unintended internal or loopback destinations
  • Host allowlists or deny lists could be bypassed
  • Applications could expose services reachable from the request-making environment
  • Redirect validation may approve a URI whose final destination differs after resolution
  • Network segmentation assumptions could be weakened

General mitigation guidance

Mitigation typically focuses on ensuring that URI percent escapes are decoded at most once and that validation evaluates the same canonical representation used for outbound routing.

Common defensive patterns include:

  • Use a parser implementation that preserves encoded percent signs and performs a single, standards-compliant decoding pass
  • Canonicalize the host before validation, then route only to the validated canonical destination
  • Apply host, scheme, port, DNS, and IP-range policies after normalization and before connection establishment
  • Treat redirects and user-controlled URI components as untrusted at every processing stage
  • Restrict outbound network privileges and apply egress controls to reduce the impact of SSRF
  • Avoid relying solely on textual hostname checks when DNS resolution or alternate address representations may change the destination

How teams detect issues like this

Organizations can detect this class of issue through:

  • Static analysis and dependency review rules for URI parsing libraries with repeated decode or recomposition paths
  • Code review checks for normalization performed separately from host-policy validation
  • Tests using nested percent-encoded URI components to verify that parsing does not change the effective destination unexpectedly
  • Policy checks requiring canonical host validation immediately before outbound connection creation
  • Integration monitoring for requests from application services to loopback, link-local, metadata, or otherwise restricted address ranges
  • Automated software composition analysis and security review tools that identify vulnerable dependency ranges

Sources

SourceLink
cna.openjsf.orgcna.openjsf.org/security-advisories.html
github.comgithub.com/fastify/fast-uri/security/advisories/GHSA-fph4-wmhf-6fwf

Frequently asked

questions

It can be exploitable through an application that accepts attacker-controlled URIs and uses fast-uri to normalize or resolve them before making outbound requests or enforcing destination policies. The dependency alone does not provide remote access without such an application-facing data flow.

An attacker generally needs the ability to submit or influence a URI processed by the vulnerable parsing path. Authentication requirements depend on whether the affected endpoint is public or restricted.

Use a parser that decodes percent escapes only once, preserves encoded percent signs correctly, and validates the canonical destination immediately before network access.

Treat URI normalization as security-sensitive, test nested encoding and redirect cases, enforce host and IP-range policies after canonicalization, and limit the network privileges of services that make outbound requests.

Find out what's already
exploitable in your codebase.