CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-6321

CVE-2026-6321: Path Traversal in fast-uri via Improper Normalization Order

Amit Schendel
Amit Schendel
Senior Security Researcher

May 8, 2026·7 min read·82 visits

Executive Summary (TL;DR)

fast-uri ≤ 3.1.0 decodes percent-encoded URI characters before running path normalization algorithms. This allows attackers to use payloads like %2e%2e to bypass security filters and perform path traversal attacks. Upgrade to version 3.1.1 to implement context-aware decoding.

The fast-uri library (versions ≤ 3.1.0) contains a high-severity path traversal vulnerability due to an order-of-operations flaw during URI normalization. The library incorrectly decodes percent-encoded path separators (%2F) and dot segments (%2E) prior to applying dot-segment removal algorithms, allowing attackers to bypass path-based access controls and filters.

Vulnerability Overview

The fast-uri library is a dependency-free URI manipulation toolkit designed to parse, normalize, and serialize URIs in accordance with RFC 3986. Applications frequently use this library to validate incoming requests, enforce security policies, or process routing logic based on requested paths. A critical aspect of this processing is URI normalization, which standardizes divergent URI representations into a single canonical form for consistent evaluation.

CVE-2026-6321 is a path traversal vulnerability (CWE-22) affecting the normalize() and equal() functions within fast-uri versions 3.1.0 and earlier. The flaw resides in the specific sequence of operations the library performs when converting an input string into a normalized URI path. The library fails to correctly separate the decoding of percent-encoded characters from the resolution of relative path segments.

This logical separation is critical because percent-encoded strings represent literal data rather than functional path syntax. By resolving relative segments after decoding encoded inputs, the library mistakenly grants functional properties to data that the sender explicitly encoded to remain inert. Consequently, security mechanisms that rely on fast-uri to accurately represent the final resolved path are subject to bypass.

Root Cause Analysis

The root cause of CVE-2026-6321 is an order-of-operations vulnerability during the URI normalization process. The specification for URI generic syntax, RFC 3986, explicitly separates the concepts of percent-encoding and path segment resolution. Section 5.2.4 defines the remove_dot_segments algorithm, which is responsible for evaluating . and .. components to resolve a path to its absolute form.

According to the RFC, percent-encoded characters must only be decoded if they belong to the "unreserved" set (alphanumerics and specific symbols). Characters in the "reserved" set, which include the dot (.) and slash (/), possess special semantic meaning in the context of a URI path. If these characters are percent-encoded, the parser must treat them as literal character data rather than structural delimiters. They must not participate in the remove_dot_segments algorithm.

In vulnerable versions of fast-uri, the internal normalization routine executed a "decode-then-process" workflow. The parser applied an indiscriminate unescaping operation to the entire URI string, converting %2E to . and %2F to /. Only after this universal decoding did the library invoke the logic to process relative directories.

By executing these operations in the wrong order, fast-uri effectively transformed harmless, encoded literals into active path traversal directives. A payload containing %2e%2e became .. inside the parsing engine before path resolution occurred, instructing the library to traverse up a directory hierarchy. This violates the specification and creates a severe discrepancy between the URI the application believes it is processing and the path the library ultimately resolves.

Code Analysis

The structural flaw in fast-uri ≤ 3.1.0 was tied to how the normalize() function managed character decoding. Prior to the fix, the logic relied on generalized unescaping mechanisms that did not differentiate between reserved and unreserved characters. When the library encountered %2E or %2F, it immediately converted them into their raw string representations.

The patch introduced in commit 876ce79b662c3e5015e4e7dffe6f37752ad34f35 completely overhauls this behavior by implementing context-aware decoding functions. The developers introduced normalizePathEncoding and normalizePercentEncoding. These functions strictly enforce the rule that only unreserved characters undergo decoding during the normalization phase.

// Conceptual representation of the patch logic introduced in 3.1.1
 
// BEFORE (Vulnerable Logic)
function normalize(uri) {
  let decoded = unescape(uri); // Indiscriminately decodes all percent-encoding
  return removeDotSegments(decoded); // Processes encoded dots as active traversal tokens
}
 
// AFTER (Patched Logic)
function normalizePathEncoding(path) {
  // Context-aware decoding: preserves reserved escapes like %2E and %2F
  return path.replace(/%[0-9A-Fa-f]{2}/g, (match) => {
    const charCode = parseInt(match.slice(1), 16);
    if (isUnreserved(charCode)) {
      return String.fromCharCode(charCode);
    }
    return match.toUpperCase(); // Retain encoding for reserved chars
  });
}

The patched logic ensures that the string %2e%2e is normalized to %2E%2E rather than ... Because the encoding is preserved, the removeDotSegments algorithm subsequently treats %2E%2E as a standard directory name, not a traversal instruction. The equal() function was similarly updated to compare URIs accurately without falsely interpreting reserved escapes as live path syntax.

Exploitation and Attack Methodology

Exploiting CVE-2026-6321 requires an attacker to identify a target application that utilizes fast-uri for security boundary enforcement. A common architectural pattern involves validating an incoming request URI against a list of permitted prefixes or directories. If the application evaluates the raw URI for authorization but uses the normalized output for downstream routing or file system access, a critical discrepancy emerges.

Consider an application configured to allow unauthenticated access strictly to the /api/public/ directory. The application implements a middleware filter that checks if the request URI begins with this permitted string. If the check passes, the application normalizes the path using fast-uri.normalize() and proxies the request to a backend file server or internal API endpoint.

An attacker crafts the following payload: http://example.com/api/public/%2e%2e/admin/config. The initial security filter examines the raw string, confirms that it starts with /api/public/, and permits the request. The middleware then passes the string to the vulnerable fast-uri normalization routine.

The vulnerable library decodes %2e%2e into .. and processes the traversal. The resulting normalized path returned by the library is /api/admin/config. The application proceeds to fetch or proxy this resolved path, unknowingly granting the attacker access to a restricted internal resource. This attack requires no authentication and relies entirely on the predictable behavior of the flawed URI parser.

Impact Assessment

The impact of CVE-2026-6321 is classified as High, with a CVSS v3.1 base score of 7.5. The vulnerability directly undermines the integrity of path-based security controls. Because the flaw allows an attacker to manipulate the fundamental state of a URI traversing a system, it introduces significant risks of unauthorized data access, internal API exposure, and potential system compromise.

The specific consequences depend entirely on how the consuming application utilizes the output of fast-uri. If the normalized path dictates file system read operations, the attacker achieves arbitrary local file disclosure (LFD). If the normalized path directs a reverse proxy, the attacker achieves Server-Side Request Forgery (SSRF) or unauthorized routing to internal management endpoints. The vulnerability is characterized by a low attack complexity and requires zero user interaction.

Currently, the EPSS score for this vulnerability is 0.00030, indicating a very low observed exploitation probability in the wild (0.03%). It is not listed in the CISA KEV catalog. However, because URI parsers often sit at the very perimeter of application architectures, organizations should treat this vulnerability with high urgency. A single unpatched microservice handling routing logic can compromise the security posture of an entire backend network.

Remediation and Mitigation

The primary and most effective remediation for CVE-2026-6321 is to update the fast-uri package to version 3.1.1 or later. The patch completely resolves the order-of-operations defect by introducing context-aware decoding functions. Development teams should audit their package.json and package-lock.json files to ensure no nested dependencies are relying on vulnerable iterations of the library.

For environments where immediate patching is not feasible, security engineers can deploy Web Application Firewall (WAF) rules to detect and block malicious payloads. WAF policies should inspect incoming HTTP request paths and query strings for the presence of encoded traversal sequences. Specifically, blocking requests containing %2e (and its variations like %2E, %252e) or %2f (%2F) provides a robust temporary defense against exploitation attempts targeting this specific parsing flaw.

Furthermore, developers should review their application logic to avoid "time-of-check to time-of-use" (TOCTOU) discrepancies. Security validation must always occur on the final, normalized state of the data, not on the raw, unparsed input. If an application authorizes a path based on a raw string but acts upon a normalized string, it inherently trusts the normalization engine to never introduce bypass conditions. Shifting the authorization check to occur after the fast-uri.normalize() execution mitigates the logical bypass entirely, regardless of underlying library flaws.

Official Patches

fastifySource code patch resolving the context-aware decoding flaw.

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS Probability
0.03%
Top 91% most exploited

Affected Systems

fast-uri <= 3.1.0Node.js applications utilizing fast-uri for request validationAPI Gateways and proxies dependent on fast-uri for routing

Affected Versions Detail

Product
Affected Versions
Fixed Version
fast-uri
fastify
<= 3.1.03.1.1
AttributeDetail
CWE IDCWE-22
Attack VectorNetwork
CVSS Score7.5 (High)
EPSS Score0.00030
Exploit StatusProof of Concept Available
CISA KEVNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Path Traversal

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Known Exploits & Detection

Vulnerability Report Example PayloadProof of concept payload demonstrating path filter bypass using %2e%2e.

Vulnerability Timeline

Vulnerability reported and fixed in fast-uri version 3.1.1.
2026-05-04
CVE-2026-6321 published by OpenJS Foundation.
2026-05-04
NVD updated with final CVSS scores.
2026-05-07

References & Sources

  • [1]Official fast-uri GitHub Advisory
  • [2]OpenJS Foundation Advisories
  • [3]CVE Record for CVE-2026-6321
  • [4]Patch Commit

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 3 hours ago•CVE-2024-29203
4.3

CVE-2024-29203: Client-Side Cross-Site Scripting via Unsandboxed Iframes and Legacy Embed Elements in TinyMCE

CVE-2024-29203 identifies a cross-site scripting (XSS) vulnerability in the content ingestion and parsing mechanics of TinyMCE rich text editor. Due to a failure to enforce sandbox attributes on dynamic iframe elements and safely handle legacy embed objects, unauthenticated attackers can inject malicious elements that execute scripts within the context of the parent application session.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 5 hours ago•CVE-2026-9277
8.1

CVE-2026-9277: OS Command Injection in shell-quote via Object-Token Line Terminator Parsing Defect

A technical breakdown of the OS command injection vulnerability in the shell-quote NPM package (CVE-2026-9277 / GHSA-w7jw-789q-3m8p). The bug resides in the character-by-character backslash-escaping logic applied to the .op field of object-tokens within the quote() function, which fails to match and escape line terminators due to a regex matching oversight in JavaScript. This allows unauthenticated remote attackers to execute arbitrary shell commands if they can control inputs processed by this library.

Alon Barad
Alon Barad
7 views•6 min read
•about 6 hours ago•CVE-2026-11645
8.8

CVE-2026-11645: Out-of-Bounds Memory Access in Google Chrome V8 Engine

A high-severity memory corruption vulnerability exists in the V8 JavaScript engine of Google Chrome before versions 149.0.7827.102/103. The flaw arises from an incorrect bounds-check elimination during JIT compilation by the TurboFan optimizer, allowing remote attackers to achieve out-of-bounds read and write access inside the sandboxed renderer process.

Amit Schendel
Amit Schendel
21 views•6 min read
•about 15 hours ago•CVE-2026-50751
9.3

CVE-2026-50751: Authentication Bypass in Check Point Security Gateway IKEv1 Legacy Validation

An improper authentication vulnerability (CWE-287) exists in the legacy, deprecated Internet Key Exchange version 1 (IKEv1) key exchange protocol implementation in Check Point Security Gateways. The vulnerability is caused by a logic flow weakness during the certificate validation process for Remote Access VPN and Mobile Access (SSL VPN) connections. An unauthenticated remote attacker can exploit this weakness to bypass user authentication entirely, establishing a fully functional Remote Access VPN connection without a valid password.

Alon Barad
Alon Barad
68 views•6 min read
•1 day ago•CVE-2026-39922
6.3

CVE-2026-39922: Server-Side Request Forgery in GeoNode Service Registration Endpoint

GeoNode versions prior to 4.4.5 and 5.0.2 are vulnerable to Server-Side Request Forgery (SSRF) in the service registration endpoint. Authenticated attackers with low privileges can exploit insufficient input validation in the Web Map Service (WMS) registration module to force the application server to make outbound network queries to loopback addresses, private RFC1918 subnets, link-local scopes, and cloud metadata endpoints. This technical report details the mechanics of the vulnerability, the underlying architectural flaw, and how to effectively remediate and mitigate the associated security risks.

Alon Barad
Alon Barad
4 views•7 min read
•1 day ago•CVE-2022-0492
7.8

CVE-2022-0492: Privilege Escalation and Container Escape via cgroups v1 release_agent

CVE-2022-0492 is a high-severity missing authorization vulnerability in the Linux kernel's Control Groups (cgroups) v1 implementation. The flaw resides within the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c, where the kernel fails to validate if the process writing to the release_agent file possesses administrative capabilities in the initial user namespace. This allows a local attacker inside a container with root privileges (UID 0) to abuse user namespaces, mount a cgroups v1 directory, modify the release_agent parameter, and execute arbitrary commands on the host system as host root, effectively achieving a complete container escape.

Amit Schendel
Amit Schendel
12 views•7 min read