CVE-2026-4923: path-to-regexp regular expression denial of service via multiple wildcards

CVE-2026-4923 · Severity: low · CVSS 3.1 · Published 2026-03-27

path-to-regexp is a popular JavaScript library that converts URL path strings (like `/user/:name`) into regular expressions for routing in web applications. When developers use multiple wildcard patterns in certain combinations, the library can generate a regex prone to ReDoS attacks—where specially crafted input causes the regex engine to consume excessive CPU resources, slowing or stopping the application. An attacker can trigger this by sending requests matching the vulnerable pattern, resulting in denial of service.

Technologies: path-to-regexp (npm). Vendors: npm.

Quick answers

Is CVE-2026-4923 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-4923 being exploited in the wild.
How severe is CVE-2026-4923?
Low severity, with a CVSS score of 3.1, published 27 March 2026.
Which products and versions are affected?
path-to-regexp (npm) SEMVER:introduced=8.0.0,fixed=8.4.0.
Is there a fix for CVE-2026-4923?
Yes. path-to-regexp (npm): upgrade to 8.4.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-4923 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-4923?
Check whether you run path-to-regexp (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • path-to-regexp (npm): upgrade to 8.4.0 or later
    npm install path-to-regexp@8.4.0

Technical details

The vulnerability is a Regular Expression Denial of Service (ReDoS / CWE-1333) that occurs when path-to-regexp generates regexes from patterns containing multiple wildcards combined with at least one parameter, where the second wildcard is not at the end of the path. Examples of vulnerable patterns include `/*foo-*bar-:baz`, `/*a-:b-*c-:d`, and `/x/*a-:b/*c/y`. The generated regex exhibits catastrophic backtracking due to overlapping quantifiers, causing exponential time complexity on malicious input. The attack requires only network access with no authentication or user interaction needed. An attacker can craft HTTP requests with paths matching the vulnerable pattern to trigger excessive CPU consumption and cause denial of service. The issue affects path-to-regexp versions 8.0.0 through 8.3.0 and is resolved in version 8.4.0.

Affected products

  • pillarjs path-to-regexp 8.0.0 to 8.3.0

Identifiers

  • CVE-2026-4923
  • GHSA-27v5-c462-wpq7

Timeline

  • 2026-03-26: disclosed: Vulnerability disclosed via GitHub Security Advisory GHSA-27v5-c462-wpq7
  • 2026-03-27: patched: Fixed in version 8.4.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.