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-4923

CVE-2026-4923: Regular Expression Denial of Service (ReDoS) in path-to-regexp

Amit Schendel
Amit Schendel
Senior Security Researcher

Mar 28, 2026·6 min read·62 visits

Executive Summary (TL;DR)

A ReDoS vulnerability in path-to-regexp >= 8.0.0 and < 8.4.0 allows attackers to cause a Denial of Service by sending crafted paths to applications utilizing complex multi-wildcard routing patterns.

The path-to-regexp library, commonly utilized by Node.js frameworks like Express.js for routing, contains a Regular Expression Denial of Service (ReDoS) vulnerability in versions 8.0.0 through 8.3.0. The flaw is triggered when processing specific route patterns containing multiple wildcards, leading to CPU exhaustion and application downtime.

Vulnerability Overview

The path-to-regexp library serves as a foundational routing component in the Node.js ecosystem. It converts developer-defined path strings into regular expressions, which frameworks like Express.js use to map incoming HTTP requests to specific application logic. The library exposes a critical attack surface whenever it processes user-supplied URLs against complex route configurations.

CVE-2026-4923 represents a CWE-1333: Inefficient Regular Expression Complexity vulnerability. Versions 8.0.0 through 8.3.0 fail to safely compile routing patterns that contain multiple wildcards followed by a named parameter. When these specific patterns are used, the resulting regular expression is vulnerable to catastrophic backtracking.

Attackers submit specially crafted, artificially long URL paths to trigger this backtracking behavior in the V8 regex engine. The engine enters an exponential evaluation loop, resulting in complete CPU core exhaustion. Because Node.js relies on a single-threaded event loop architecture, this CPU exhaustion creates a severe Denial of Service (DoS) condition, halting all application processing.

Root Cause Analysis

The vulnerability originates in the regex generation logic for ambiguous capture groups. When the library parses routes containing sequences such as /*foo-*bar-:baz, it outputs regular expressions utilizing broad, greedy quantifiers (+) for the wildcard segments. Greedy quantifiers instruct the regex engine to consume as many characters as possible during the initial matching phase.

When multiple greedy wildcards are adjacent or overlapping, the engine loses deterministic boundaries between the segments. The regex engine must evaluate how to divide the input string among the available capture groups. If an input matches the initial wildcard segments but fails to satisfy the final parameter constraint (the :baz segment), the engine initiates a backtracking procedure.

During backtracking, the engine recursively attempts every possible distribution of the input string characters across the preceding wildcard groups. It trades characters one by one between the *foo and *bar segments, attempting to find a valid match path. This combinatorial explosion of state evaluations scales exponentially with the length of the input string, leading directly to the Denial of Service condition.

Code Analysis

The remediation in version 8.4.0 introduces several structural changes to the regular expression compilation phase. The primary fix involves transitioning from greedy quantifiers to non-greedy or lazy quantifiers (+?) for wildcard and parameter capture groups. Commit 43669ac637fe70fad33693d145a74d98179152ce modifies the internal generation logic to use these lazy quantifiers.

// Vulnerable generation pattern (Conceptual)
const regex = /^(?:\/(.*))(?:\/(.*))(?:\/([^\/#\?]+?))[\/#\?]?$/i;
 
// Patched generation pattern (Conceptual)
const regex = /^(?:\/(.*?))(?:\/(.*?))(?:\/([^\/#\?]+?))[\/#\?]?$/i;

The shift to lazy quantifiers prevents the engine from over-consuming characters initially. This drastically reduces the state space explored during a failure condition because the engine matches the minimum necessary characters for each segment before moving forward. Commit 4864654 also improved the negate function and added peekText and hasInSegment helpers to strictly delimit wildcard capture groups by their trailing literal characters.

Additionally, commit 22a967901afc8b2b42eefe456faa7b6773dcc415 implements a hard combinatorial limit. The library calculates the number of possible routing permutations during compilation. If a user-defined path involves so many optional groups or wildcards that it generates more than 256 internal permutations, the library throws a PathError. This preemptively blocks the compilation of inherently dangerous routing patterns.

Exploitation

Exploitation requires the target application to explicitly define a vulnerable routing pattern. The application must use path-to-regexp versions 8.0.0 through 8.3.0 and configure a route containing multiple wildcards where the final wildcard is not at the absolute end of the path string. Safe patterns include /*foo-:bar and /*foo-:bar-*baz.

An attacker crafts a malicious HTTP request targeting the vulnerable route. The request path consists of a repeating sequence of characters designed to match the wildcard segments, suffixed with a character that intentionally fails the final parameter match. The length of the repeating sequence dictates the severity and duration of the resulting CPU spike.

const { pathToRegexp } = require('path-to-regexp');
const { regexp } = pathToRegexp('/*foo-*bar-:baz');
 
// Input that causes backtracking:
const maliciousInput = "/-".repeat(50) + "!"; 
regexp.test(maliciousInput); // Node.js process hangs

Upon receiving this request, the application attempts to match the path against the generated regular expression. The evaluation consumes the thread entirely. Multiple concurrent requests utilizing this payload will exhaust available worker threads or event loops across a clustered deployment, rendering the entire service unavailable.

Impact Assessment

The primary impact of CVE-2026-4923 is a severe Denial of Service condition affecting application availability. A blocking regular expression evaluation prevents the Node.js event loop from processing any subsequent HTTP requests, timers, or asynchronous callbacks. The application becomes completely unresponsive to legitimate user traffic.

The vulnerability carries a CVSS 3.1 base score of 5.9, reflecting the high impact on availability combined with a high attack complexity. The attack complexity is designated as high because exploitation is entirely dependent on the specific, developer-defined routing configuration. Applications using simple routing patterns are unaffected, regardless of the library version installed.

Confidentiality and integrity are not impacted by this vulnerability. The attacker cannot extract sensitive data, modify application state, bypass authentication, or execute arbitrary code. The impact is strictly isolated to computational resource exhaustion.

Remediation

The definitive remediation for CVE-2026-4923 is upgrading the path-to-regexp dependency to version 8.4.0 or later. Organizations must utilize Software Composition Analysis (SCA) tools to identify all transitive and direct dependencies on the vulnerable versions, as path-to-regexp is frequently nested within framework dependency trees.

If an immediate dependency upgrade is impossible, developers must audit and refactor routing configurations. Routes must not contain multiple wildcards unless the final wildcard terminates the path string. Vulnerable patterns such as /*foo-*bar-:baz must be removed or rewritten to utilize explicit parameter definitions rather than catch-all wildcards.

Implementing strict input validation provides an effective defense-in-depth measure. Applications and Web Application Firewalls (WAFs) should enforce maximum length constraints on URL paths. Since ReDoS execution time scales exponentially with input length, truncating long paths prevents the regex engine from reaching catastrophic failure states.

Official Patches

pillarjsFix Commit (Quantifier Change)
pillarjsFix Commit (Combinations Limit)

Fix Analysis (2)

Technical Appendix

CVSS Score
5.9/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Probability
0.04%
Top 88% most exploited

Affected Systems

Node.js ApplicationsExpress.js Framework DeploymentsApplications utilizing path-to-regexp >= 8.0.0, < 8.4.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
path-to-regexp
pillarjs
>= 8.0.0, < 8.4.08.4.0
AttributeDetail
CWE IDCWE-1333
Attack VectorNetwork
CVSS Score5.9 (Medium)
EPSS Score0.0004 (0.04%)
ImpactHigh Availability (DoS)
Exploit StatusNone (PoC available)
CISA KEVNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
T1190Exploit Public-Facing Application
Initial Access
CWE-1333
Inefficient Regular Expression Complexity

Inefficient Regular Expression Complexity

Known Exploits & Detection

Researcher ConfigurationPoC methodology demonstrating failure conditions in wildcard sequence parsing.

Vulnerability Timeline

Initial work on CI and dependency cleanup.
2025-09-05
Major refactoring and ReDoS fixes merged.
2026-03-26
Version 8.4.0 released.
2026-03-26
CVE-2026-4923 officially published.
2026-03-26

References & Sources

  • [1]CVE Record: CVE-2026-4923
  • [2]NVD Detail: CVE-2026-4923
  • [3]OpenJS Security Advisory
  • [4]GitHub Repository: path-to-regexp
  • [5]GHSA Advisory: GHSA-27v5-c462-wpq7

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

•1 day ago•CVE-2026-71556
7.1

CVE-2026-71556: Symbolic Link Directory Traversal in go-git

A symbolic link directory traversal vulnerability was identified in go-git, a pure Go implementation of the Git specification. This vulnerability allows an attacker to construct a repository that, when checked out or processed, bypasses directory boundaries to write or overwrite arbitrary files on the host filesystem.

Amit Schendel
Amit Schendel
5 views•5 min read
•1 day ago•CVE-2026-71557
6.3

CVE-2026-71557: Path Traversal and Configuration Overwrite in go-git Filesystem Storage Engine

CVE-2026-71557 is a path traversal vulnerability in go-git, a pure-Go implementation of Git. In vulnerable versions, the filesystem-backed storage engine fails to validate reference names before mapping them to on-disk paths. An attacker hosting a malicious Git server can advertise references containing directory traversal sequences, such as 'refs/heads/../../config', to write or overwrite files outside the intended reference storage directory.

Amit Schendel
Amit Schendel
6 views•7 min read
•1 day ago•GHSA-7C4V-FWGW-9RF7
5.3

GHSA-7c4v-fwgw-9rf7: Nuxt Dev Server Discloses Project Root and Workspace UUID via Chrome DevTools Endpoint

An information disclosure vulnerability in the Nuxt development server allows adjacent network attackers to retrieve the absolute project root directory and a persistent workspace UUID by querying the unprotected Chrome DevTools workspace endpoint. This occurs when the development server is bound to a network-reachable interface, allowing requests that bypass the header-based security verification checks.

Alon Barad
Alon Barad
5 views•7 min read
•1 day ago•CVE-2026-66062
5.3

CVE-2026-66062: Regular Expression Denial of Service (ReDoS) in SvelteKit Content Negotiation

A Regular Expression Denial of Service (ReDoS) vulnerability exists in SvelteKit's content negotiation header parser prior to version 2.70.2. An unauthenticated remote attacker can exploit this vulnerability by sending a crafted Accept header with highly repetitive malformed values. This triggers catastrophic backtracking on the single-threaded Node.js/Bun event loop, leading to CPU exhaustion and full denial of service.

Alon Barad
Alon Barad
5 views•6 min read
•1 day ago•CVE-2026-15895
8.4

CVE-2026-15895: OS Command Injection in AWS jsii-diff CLI

An OS command injection vulnerability exists in the npm package loading component of the jsii-diff CLI tool within the AWS jsii framework. Prior to version 1.131.0, when parsing package specifiers prefixed with `npm:`, the tool concatenated user-controlled inputs directly into a shell execution string via child_process.exec. This allows attackers to execute arbitrary shell commands under the context of the running Node.js process.

Amit Schendel
Amit Schendel
5 views•7 min read
•1 day ago•CVE-2026-63220
4.8

CVE-2026-63220: Trust of Untrusted Reverse Proxy Headers in CodeIgniter4

CodeIgniter4 versions prior to v4.7.4 contain a protocol-spoofing vulnerability due to improper verification of upstream reverse proxy forwarding headers. Remote, unauthenticated attackers can inject headers like X-Forwarded-Proto to deceive the framework into identifying an insecure HTTP request as a secure HTTPS connection.

Alon Barad
Alon Barad
7 views•7 min read