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-110306 Overview
CVE-2026-110306 affects fast-uri, a dependency-free RFC 3986 URI parser and serializer for Node.js maintained under the Fastify project. The library percent-decodes the scheme component with the legacy global unescape() function before validating it. An attacker can supply a URI whose encoded scheme decodes to a dangerous token such as javascript, data, or vbscript. Applications that screen the raw input and then store or render the normalized result turn an inert string into an executable URL. This produces stored or reflected cross-site scripting (XSS) [CWE-172]. The equal() comparison also treats encoded and plain schemes as identical, bypassing equality-based allowlists.
Critical Impact
Attackers can bypass scheme allowlists to inject javascript:, data:, or vbscript: URLs that execute in a victim's browser after normalization by fast-uri.
Affected Products
- fast-uri versions prior to 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-110306 published to NVD
- 2026-10-20 - Last updated in NVD database
Technical Details for CVE-2026-110306
Vulnerability Analysis
The vulnerability stems from improper handling of percent-encoded characters in the URI scheme component, categorized under [CWE-172] Encoding Error. RFC 3986 does not permit percent-encoding inside a scheme, and no compliant parser accepts such input. However, fast-uri decodes the scheme using the legacy unescape() function before validation and emits the decoded token as the live scheme in its output.
An application that inspects the raw URI, decides the scheme looks safe, and then stores or renders the parsed result ends up with a different, dangerous scheme. The transformation converts an inert allowlisted string into an active javascript:, data:, or vbscript: URL. When the resolved URL reaches a sink such as an href attribute, the browser executes the attacker-controlled payload.
The equal() function compounds the issue by treating a percent-encoded scheme and its decoded plain-text equivalent as equal. Allowlist checks based on string equality are therefore bypassable.
Root Cause
The parser applies unescape() to the scheme segment before enforcing RFC 3986 syntax rules. This decoding step should never occur for a scheme, since percent-encoding is syntactically invalid at that position. The decoded value is then returned as the canonical scheme instead of being rejected.
Attack Vector
Exploitation requires network delivery of a crafted URI and user interaction such as clicking the rendered link. An attacker submits a value like javascript with select characters percent-encoded in the scheme portion. Upstream filters that scan the raw string see a non-matching scheme and permit the input. After fast-uri normalization, the scheme becomes javascript and is written into HTML or a redirect target, producing stored or reflected XSS.
See the GitHub Security Advisory GHSA-w74x-v6f9-j3xg for additional technical detail.
Detection Methods for CVE-2026-110306
Indicators of Compromise
- HTTP request parameters, redirect targets, or user-submitted URLs containing a percent sign within the scheme segment, for example java%73cript: or ja%76ascript:.
- Rendered HTML containing javascript:, data:, or vbscript: URLs that did not match these schemes in inbound logs.
- Content Security Policy (CSP) violation reports citing inline script execution originating from anchor or iframe elements.
Detection Strategies
- Inventory Node.js projects and dependencies with npm ls fast-uri to identify affected versions 2.x < 2.4.8, 3.0.0–3.1.8, and 4.0.0–4.2.2.
- Review application code paths that pass URI parser output into DOM sinks, redirect responses, or persistence layers after allowlist checks on raw input.
- Add regression tests that submit percent-encoded dangerous schemes and assert the application rejects or neutralizes them end-to-end.
Monitoring Recommendations
- Alert on web application firewall (WAF) events that match percent-encoded scheme patterns in URL and body parameters.
- Collect and review CSP report-uri or report-to telemetry for script-src violations tied to rendered links.
- Monitor outbound click telemetry and server logs for user navigation to data: or javascript: URLs served from your origin.
How to Mitigate CVE-2026-110306
Immediate Actions Required
- Upgrade fast-uri to version 2.4.8, 3.1.9, 4.2.3, or later across all production and build dependencies.
- Audit transitive dependencies that bundle fast-uri, including Fastify and ajv-formats, and update them to releases that pin a fixed version.
- Reject any inbound URI whose scheme component contains a percent sign before further processing.
Patch Information
The maintainers released fixes in fast-uri 2.4.8, 3.1.9, and 4.2.3. Users should upgrade to one of these versions or later. Reference the OpenJS Foundation Security Advisories and the GitHub Security Advisory GHSA-w74x-v6f9-j3xg for release notes.
Workarounds
- Validate the parsed scheme against an allowlist after calling the parser, and use that parsed result rather than the raw input for downstream rendering or storage.
- Reject input whose scheme part contains a % character before passing it to fast-uri.
- Apply a strict Content Security Policy that forbids inline script execution and blocks javascript: URLs as a defense-in-depth control.
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

