npm package report

Is path-to-regexp safe?

5 known vulnerabilities, worst severity HIGH.

// reach

3 direct dependencies

none carry a known advisory

    126 packages depend on it

    an advisory here reaches each of them

    • express-request-proxy
    • fly
    Create a free accountfor every dependency path, dependent and what to upgrade
    // ai model usage

    Tracked for PyPI packages. HuggingFace models declare Python dependencies, so npm packages are not covered.


    cvss
    7.5
    high

    CVSS v3.1 base score out of 10

    epss
    0.52%
    medium

    chance of exploitation in 30 days, 44th percentile of all CVEs

    xyz score
    4.7
    medium

    CyberXYZ composite out of 10

    fig. 01 — GHSA-37ch-88jc-xwx2, the advisory selected below

    // 5 advisories

    GHSA-37ch-88jc-xwx2

    HIGHGitHub ratingCVE-2026-4867
    // impact

    A bad regular expression is generated any time you have three or more parameters within a single segment, separated by something that is not a period (.). For example, /:a-:b-:c or /:a-:b-:c-:d. The backtrack protection added in path-to-regexp@0.1.12 only prevents ambiguity for two parameters. With three or more, the generated lookahead does not block single separator characters, so capture groups overlap and cause catastrophic backtracking.

    // patches

    Upgrade to path-to-regexp@0.1.13

    Custom regex patterns in route definitions (e.g., /:a-:b([^-/]+)-:c([^-/]+)) are not affected because they override the default capture group.

    // workarounds

    All versions can be patched by providing a custom regular expression for parameters after the first in a single segment. As long as the custom regular expression does not match the text before the parameter, you will be safe. For example, change /:a-:b-:c to /:a-:b([^-/]+)-:c([^-/]+).

    If paths cannot be rewritten and versions cannot be upgraded, another alternative is to limit the URL length.

    // references
    // cvss v3.1 vector

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

    Attack vector
    Network
    Attack complexity
    Low
    Privileges required
    None
    User interaction
    None
    Scope
    Unchanged
    Confidentiality
    None
    Integrity
    None
    Availability
    High

    Checked 2026-11-06 at 23:10 UTC. The most recent advisory here was published 2026-03-27. Updated continuously from NVD, GHSA, OSV and CNA feeds.

    Think a verdict here is wrong? Tell us — we respond within 2 business days.