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

Source: https://junglewise.ai/threats/cve-2026-4923-pillarjs-path-to-regexp-redos-via-multiple-wildcards  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-27. Updated: 2026-09-24  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/path-to-regexp). Vendors: [npm](https://junglewise.ai/threats/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

  ```sh
  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

- [https://github.com/pillarjs/path-to-regexp/security/advisories/GHSA-27v5-c462-wpq7](https://github.com/pillarjs/path-to-regexp/security/advisories/GHSA-27v5-c462-wpq7)
- [https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
- [https://github.com/pillarjs/path-to-regexp](https://github.com/pillarjs/path-to-regexp)
- [https://makenowjust-labs.github.io/recheck/playground](https://makenowjust-labs.github.io/recheck/playground)

## Related threats

- [pillarjs path-to-regexp ReDoS via multiple route parameters](https://junglewise.ai/threats/cve-2026-4867-pillarjs-path-to-regexp-redos-via-multiple-route-parameters)
- [path-to-regexp denial of service via sequential optional groups](https://junglewise.ai/threats/cve-2026-4926-path-to-regexp-denial-of-service-via-sequential-optional-groups)
- [path-to-regexp ReDoS vulnerability](https://junglewise.ai/threats/cve-2024-52798-path-to-regexp-redos-vulnerability)
- [path-to-regexp ReDoS via backtracking regular expressions](https://junglewise.ai/threats/cve-2024-45296-path-to-regexp-redos-via-backtracking-regular-expressions)
