CVE-2026-4867

Source
https://cve.org/CVERecord?id=CVE-2026-4867
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-4867.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-4867
Aliases
Downstream
Related
Published
2026-03-26T16:16:25.501Z
Modified
2026-06-18T03:56:49.224863074Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route parameters
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-1333"
    ],
    "cna_assigner": "openjs",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/4xxx/CVE-2026-4867.json",
    "unresolved_ranges": [
        {
            "extracted_events": [
                {
                    "fixed": "0.1.13"
                }
            ],
            "source": "AFFECTED_FIELD"
        }
    ]
}
References

Affected packages

Git / github.com/pillarjs/path-to-regexp

Affected ranges

Type
GIT
Repo
https://github.com/pillarjs/path-to-regexp
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
{
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "0.1.13"
        }
    ],
    "source": "CPE_RANGE",
    "cpe": "cpe:2.3:a:pillarjs:path-to-regexp:*:*:*:*:*:node.js:*:*"
}

Affected versions

0.*
0.0.2
0.1.0
v0.*
v0.1.1
v0.1.10
v0.1.11
v0.1.12
v0.1.2
v0.1.3
v0.1.4
v0.1.5
v0.1.6
v0.1.7
v0.1.8
v0.1.9

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-4867.json"