Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. path-to-regexp
  4. ›
  5. CVE-2026-4923

CVE-2026-4923: path-to-regexp vulnerable to Regular Expression Denial of Service via multiple wildcards

March 27, 2026

When using multiple wildcards, combined with at least one parameter, a regular expression can be generated that is vulnerable to ReDoS. This backtracking vulnerability requires the second wildcard to be somewhere other than the end of the path.

Unsafe examples:

/*foo-*bar-:baz
/*a-:b-*c-:d
/x/*a-:b/*c/y

Safe examples:

/*foo-:bar
/*foo-:bar-*baz

References

  • cna.openjsf.org/security-advisories.html
  • github.com/advisories/GHSA-27v5-c462-wpq7
  • github.com/pillarjs/path-to-regexp
  • github.com/pillarjs/path-to-regexp/security/advisories/GHSA-27v5-c462-wpq7
  • makenowjust-labs.github.io/recheck/playground
  • nvd.nist.gov/vuln/detail/CVE-2026-4923

Code Behaviors & Features

Detect and mitigate CVE-2026-4923 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 8.0.0 before 8.4.0

Fixed versions

  • 8.4.0

Solution

Upgrade to version 8.4.0 or above.

Impact 5.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-1333: Inefficient Regular Expression Complexity

Source file

npm/path-to-regexp/CVE-2026-4923.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:19:35 +0000.