Skip to content

← Public intelligence

npm package

path-to-regexp

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

4 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 5.9npmAmendedPublished

    path-to-regexp vulnerable to Regular Expression Denial of Service via multiple wildcards

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

    Affected
    • npm path-to-regexp >= 8.0.0, < 8.4.0
    Fixed in
    8.4.0· Vendor fix available
    Issue
    Impact 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: Safe examples: Patches Upgrade to version 8.4.0. Workarounds If developers are using multiple wildcard parameters, they can check the regex output with a tool such as https://makenowjust-labs.github.io/recheck/playground/ to confirm whether a path is vulnerable.

    Recommended action: Upgrade to 8.4.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. High, CVSS 7.5npmAmendedPublished

    path-to-regexp vulnerable to Denial of Service via sequential optional groups

    CVE-2026-4926 · GHSA-j3q9-mxjg-w52f

    Affected
    • npm path-to-regexp >= 8.0.0, < 8.4.0
    Fixed in
    8.4.0· Vendor fix available
    Issue
    Impact A bad regular expression is generated any time you have multiple sequential optional groups (curly brace syntax), such as {a}{b}{c}:z. The generated regex grows exponentially with the number of groups, causing denial of service. Patches Fixed in version 8.4.0. Workarounds Limit the number of sequential optional groups in route patterns. Avoid passing user-controlled input as route patterns.

    Recommended action: Upgrade to 8.4.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. High, CVSS 7.7npmAmendedPublished

    path-to-regexp outputs backtracking regular expressions

    CVE-2024-45296 · GHSA-37ch-88jc-xwx2

    Affected
    • npm path-to-regexp >= 0.2.0, < 1.9.0; < 0.1.10; >= 7.0.0, < 8.0.0; >= 2.0.0, < 3.3.0; >= 4.0.0, < 6.3.0
    Fixed in
    1.9.00.1.108.0.03.3.06.3.0· Vendor fix available
    Issue
    Impact 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`. Patches For users of 0.1, upgrade to `0.1.10`. All other users should upgrade to `8.0.0`. These versions add backtrack protection when a custom regex pattern is not provided: - 0.1.10 - 1.9.0 - 3.3.0 - 6.3.0 They do not protect against vulnerable user supplied capture groups. Protecting against explicit user patterns is out of scope for old versions and not considered a vulnerability. Version 7.1.0 can enable `strict: true` and get an error when the regular expression might be…

    Recommended action: Upgrade to 8.0.0, 6.3.0, 3.3.0 or 2 more by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)osv.dev (2)Source checked Evidence →
  4. High, CVSS 7.7npmAmendedPublished

    path-to-regexp contains a ReDoS

    CVE-2024-52798 · GHSA-rhx6-c78j-4q9w

    Affected
    • npm path-to-regexp < 0.1.12
    Fixed in
    0.1.12· Vendor fix available
    Issue
    Impact The regular expression that is vulnerable to backtracking can be generated in versions before 0.1.12 of path-to-regexp, originally reported in CVE-2024-45296 Patches Upgrade to 0.1.12. Workarounds Avoid using two parameters within a single path segment, when the separator is not . (e.g. no /:a-:b). Alternatively, you can define the regex used for both parameters and ensure they do not overlap to allow backtracking. References - https://github.com/advisories/GHSA-9wv6-86v2-598j - https://blakeembrey.com/posts/2024-09-web-redos/

    Recommended action: Upgrade to 0.1.12 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →