Skip to content
Heist/ feed
Back to feed
High

path-to-regexp outputs backtracking regular expressions

Type: advisorySources: OSV

path-to-regexp turns path strings into a regular expressions. In certain cases, path-to-regexp will output a regular expression that can be exploited to cause poor performance. Because JavaScript is single threaded and regex matching runs on the main thread, poor performance will block the event loop and lead to a DoS. The bad regular expression is generated any time you have two parameters within a single segment, separated by something that is not a period (.). For users of 0.1, upgrade to 0.1.10. All other users should upgrade to 8.0.0.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-45296, CVE-2026-4867
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 15:36 UTC · Revision 1

Source evidence

path-to-regexp outputs backtracking regular expressions

core-osv · Original source

Published 9 Sept 2024, 19:07 UTC

path-to-regexp turns path strings into a regular expressions. In certain cases, path-to-regexp will output a regular expression that can be exploited to cause poor performance. Because JavaScript is single threaded and regex matching runs on the main thread, poor performance will block the event loop and lead to a DoS. The bad regular expression is generated any time you have two parameters within a single segment, separated by something that is not a period (.). For users of 0.1, upgrade to 0.1.10. All other users should upgrade to 8.0.0.

osv:CVE-2024-45296
Complete source record
{
  "id": "2be50424c0022c2f1925e7960fc2d3b112a924369e9220b90ae4d707c12a74f8",
  "url": "https://osv.dev/vulnerability/CVE-2024-45296",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "path-to-regexp outputs backtracking regular expressions",
    "summary": "path-to-regexp turns path strings into a regular expressions. In certain cases, path-to-regexp will output a regular expression that can be exploited to cause poor performance. Because JavaScript is single threaded and regex matching runs on the main thread, poor performance will block the event loop and lead to a DoS. The bad regular expression is generated any time you have two parameters within a single segment, separated by something that is not a period (.). For users of 0.1, upgrade to 0.1.10. All other users should upgrade to 8.0.0.",
    "evidence": "osv:CVE-2024-45296",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-45296",
      "aliases": [
        "CVE-2024-45296",
        "CVE-2026-4867",
        "GHSA-37ch-88jc-xwx2",
        "GHSA-9wv6-86v2-598j"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/pillarjs/path-to-regexp",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "c827fcea751b2e9ec6ca68a1b95a82e438728868"
                },
                {
                  "introduced": "1c24c4c16bee21a30298e5c41b6cbbef1f394cf2"
                },
                {
                  "fixed": "ed1095e0fa78a692e7f3d489e383e7bb1f9d2cc4"
                },
                {
                  "fixed": "29b96b4a1de52824e1ca0f49a701183cc4ed476f"
                },
                {
                  "fixed": "60f2121e9b66b7b622cc01080df0aabda9eedee6"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.1.10"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "introduced": "0.2.0"
                      },
                      {
                        "fixed": "8.0.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "29b96b4a1de52824e1ca0f49a701183cc4ed476f"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "60f2121e9b66b7b622cc01080df0aabda9eedee6"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v6.2.2",
            "v3.2.0",
            "v7.1.0",
            "v0.1.9",
            "v0.1.8",
            "v7.0.0",
            "v0.1.7",
            "v6.2.1",
            "v6.2.0",
            "v6.1.0",
            "v6.0.0",
            "v5.0.0",
            "v4.0.5",
            "v4.0.4",
            "v4.0.3",
            "v4.0.2",
            "v4.0.1",
            "v4.0.0",
            "v3.1.0",
            "v3.0.0",
            "v2.4.0",
            "v2.3.0",
            "v2.2.1",
            "v2.2.0",
            "v2.1.0",
            "v2.0.0",
            "v1.7.0",
            "v1.6.0",
            "v1.5.3",
            "v1.5.2",
            "v1.5.1",
            "v1.5.0",
            "v1.4.0",
            "v1.3.0",
            "v1.2.1",
            "v0.1.6",
            "v0.1.5",
            "v1.2.0",
            "v1.1.1",
            "v1.1.0",
            "v0.1.4",
            "v0.1.3",
            "v1.0.3",
            "v1.0.2",
            "v1.0.1",
            "v1.0.0",
            "v0.2.5",
            "v0.2.4",
            "v0.2.3",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0",
            "v0.1.2",
            "v0.1.1",
            "0.1.0",
            "0.0.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-45296.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:51.374084857Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/45xxx/CVE-2024-45296.json",
        "https://github.com/pillarjs/path-to-regexp/security/advisories/GHSA-9wv6-86v2-598j",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-45296",
        "https://security.netapp.com/advisory/ntap-20250124-0001/",
        "https://github.com/pillarjs/path-to-regexp/commit/29b96b4a1de52824e1ca0f49a701183cc4ed476f",
        "https://github.com/pillarjs/path-to-regexp/commit/60f2121e9b66b7b622cc01080df0aabda9eedee6"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-1333"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/45xxx/CVE-2024-45296.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-45296",
        "evidence": "/id"
      },
      {
        "value": "CVE-2026-4867",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 519776,
  "published_at": "2024-09-09T19:07:40.313+00:00"
}