Skip to main content
Vulnerability Database/CVE-2026-110725

CVE-2026-110725: fast-uri Node.js Library XSS Vulnerability

CVE-2026-110725 is a cross-site scripting flaw in fast-uri, a Node.js URI parser library. It allows attackers to inject malicious URLs through improper handling of relative references. This article covers technical details, affected versions, security impact, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-110725 Overview

CVE-2026-110725 is a URI parsing flaw in fast-uri, a dependency-free RFC 3986 URI parser and serializer for Node.js. The library emits malformed relative references when serialize(), normalize(), or resolve() are called with the non-default reference option set to suffix on a reference lacking an authority component. The output can contain a bare colon in its first path segment, violating RFC 3986 and allowing the string to reparse as an absolute URI with an attacker-controlled scheme. Affected versions include releases prior to 2.4.8, 3.0.0 through 3.1.8, and 4.0.0 through 4.2.2. The weakness maps to [CWE-41] (Improper Resolution of Path Equivalence).

Critical Impact

Serialized relative references can be reinterpreted as javascript:, data:, or vbscript: URLs, enabling cross-site scripting when the output is treated as a URI.

Affected Products

  • fast-uri versions earlier than 2.4.8
  • fast-uri versions 3.0.0 through 3.1.8
  • fast-uri versions 4.0.0 through 4.2.2

Discovery Timeline

  • 2026-10-20 - CVE-2026-110725 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-110725

Vulnerability Analysis

The flaw resides in how fast-uri serializes relative references under the suffix reference option. RFC 3986 requires that the first path segment of a relative reference not contain an unescaped colon. A bare colon forces the parser to interpret the leading segment as a scheme, converting a relative reference into an absolute URI. The library omits that escaping requirement during serialization, normalization, and resolution.

Applications that pass user-controlled input through serialize(), normalize(), or resolve() and later consume the output as a URI can be tricked into treating hostile schemes as valid. The equal() comparison function also fails to distinguish a scheme-bearing reference from a relative one, which can defeat allowlist checks that rely on reference equality.

Root Cause

The root cause is missing percent-encoding of the colon character in the first path segment when emitting relative references with the suffix option. The serializer trusts the caller to supply colon-free segments rather than enforcing RFC 3986 Section 4.2 at the output boundary. This is a classic path equivalence resolution weakness tracked as [CWE-41].

Attack Vector

An attacker supplies a crafted relative reference containing a colon in its first segment to an application that normalizes or serializes URIs with the suffix option. The emitted string reparses as javascript:payload, data:text/html,<script>..., or vbscript:.... When the application places this output into an HTML attribute such as href or src, the browser executes the attacker-controlled scheme. Exposure is limited to applications that explicitly set the non-default suffix reference option.

No verified public proof-of-concept is available at this time. Refer to the GitHub Security Advisory GHSA-333x-w4r6-6crp for authoritative technical details.

Detection Methods for CVE-2026-110725

Indicators of Compromise

  • Serialized relative references in application logs that begin with javascript:, data:, or vbscript: after passing through fast-uri.
  • Outbound HTML responses containing anchor or script elements whose URL attributes resolve to non-HTTP schemes derived from user input.
  • Unexpected scheme-bearing strings returned by fast-uri APIs when the caller intended a relative reference.

Detection Strategies

  • Perform static analysis of Node.js codebases to locate calls to serialize(), normalize(), or resolve() where the reference option is set to suffix.
  • Audit dependency manifests and package-lock.json files for fast-uri versions below 2.4.8, between 3.0.0 and 3.1.8, or between 4.0.0 and 4.2.2.
  • Add runtime assertions that reject output strings containing a colon in the first path segment before downstream URI consumption.

Monitoring Recommendations

  • Monitor web application firewall logs for request parameters containing colons in positions that typically carry relative paths.
  • Alert on content security policy (CSP) violations referencing javascript: or data: schemes originating from server-rendered URL attributes.
  • Track software composition analysis reports for new advisories affecting URI parsing libraries across build pipelines.

How to Mitigate CVE-2026-110725

Immediate Actions Required

  • Upgrade fast-uri to version 2.4.8, 3.1.9, 4.2.3, or later across all Node.js services and build artifacts.
  • Inventory all direct and transitive dependencies on fast-uri using npm ls fast-uri or equivalent tooling.
  • Review application code paths that invoke serialize(), normalize(), or resolve() with the suffix reference option and treat the output as untrusted until patched.

Patch Information

The maintainers released fixed builds in fast-uri 2.4.8, 3.1.9, and 4.2.3. The fixes enforce percent-encoding of the colon in the first path segment of relative references emitted under the suffix option. Patch details and version metadata are published in the GitHub Security Advisory GHSA-333x-w4r6-6crp and the OpenJS Foundation Security Advisories.

Workarounds

  • Avoid using the suffix reference option on untrusted input until the library is upgraded.
  • Percent-encode any colon character in the first path segment of the output before treating the result as a URI.
  • Validate that serialized relative references do not begin with a recognized scheme such as javascript:, data:, or vbscript: before rendering them into HTML attributes.
bash
# Configuration example
npm install fast-uri@^4.2.3

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.