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

CVE-2024-45296: path-to-regexp outputs backtracking regular expressions

September 9, 2024 (updated January 24, 2025)

A bad regular expression is generated any time you have two parameters within a single segment, separated by something that is not a period (.). For example, /:a-:b.

References

  • github.com/advisories/GHSA-9wv6-86v2-598j
  • github.com/pillarjs/path-to-regexp
  • github.com/pillarjs/path-to-regexp/commit/29b96b4a1de52824e1ca0f49a701183cc4ed476f
  • github.com/pillarjs/path-to-regexp/commit/60f2121e9b66b7b622cc01080df0aabda9eedee6
  • github.com/pillarjs/path-to-regexp/commit/925ac8e3c5780b02f58cbd4e52f95da8ad2ac485
  • github.com/pillarjs/path-to-regexp/commit/d31670ae8f6e69cbfd56e835742195b7d10942ef
  • github.com/pillarjs/path-to-regexp/commit/f1253b47b347dcb909e3e80b0eb2649109e59894
  • github.com/pillarjs/path-to-regexp/releases/tag/v6.3.0
  • github.com/pillarjs/path-to-regexp/security/advisories/GHSA-9wv6-86v2-598j
  • nvd.nist.gov/vuln/detail/CVE-2024-45296
  • security.netapp.com/advisory/ntap-20250124-0001

Code Behaviors & Features

Detect and mitigate CVE-2024-45296 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 before 0.1.10, all versions starting from 0.2.0 before 1.9.0, all versions starting from 2.0.0 before 3.3.0, all versions starting from 4.0.0 before 6.3.0, all versions starting from 7.0.0 before 8.0.0

Fixed versions

  • 1.9.0
  • 0.1.10
  • 8.0.0
  • 3.3.0
  • 6.3.0

Solution

Upgrade to versions 0.1.10, 1.9.0, 3.3.0, 6.3.0, 8.0.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/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-2024-45296.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Wed, 14 May 2025 12:15:33 +0000.