CVE-2026-4867: Path to regexp Denial of Service Vulnerability
HIGHCVE-2026-4867 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Path to regexp libraries in the npm ecosystem. The issue involves path-to-regexp vulnerable to regular expression denial of service via multiple route parameters. Remediation is available by upgrading affected packages to version 0.1.13.
CVE-2026-4867 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-4867
To remediate this vulnerability, upgrade all affected Path to regexp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install path-to-regexp@0.1.13
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls path-to-regexp
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-4867, inspect your project dependencies using npm:
npm ls path-to-regexp
Analyze the terminal output to locate any version of Path to regexp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.13), your application is affected.
Note: The npm ls path-to-regexp command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Path to regexp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-4867 Affected Path to regexp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
path-to-regexp
|
npm |
< 0.1.13
|
0.1.13
|
References
Frequently Asked Questions
What is CVE-2026-4867?
Which Path to regexp versions are affected?
What version fixes CVE-2026-4867?
Is path-to-regexp affected?
What is the CVSS score of CVE-2026-4867?
What CWE is associated with CVE-2026-4867?
How can I check npm dependencies for CVE-2026-4867?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-37ch-88jc-xwx2",
"modified" : "2026-03-27T20:04:53Z",
"published" : "2026-03-27T20:04:53Z",
"aliases" : [ "CVE-2026-4867" ],
"summary" : "path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route parameters",
"details" : "### Impact\n\nA 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.\n\n### Patches\n\nUpgrade to [path-to-regexp@0.1.13](https://github.com/pillarjs/path-to-regexp/releases/tag/v.0.1.13)\n\nCustom regex patterns in route definitions (e.g., `/:a-:b([^-/]+)-:c([^-/]+)`) are not affected because they override the default capture group.\n\n### Workarounds\n\nAll 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([^-/]+)`.\n\nIf paths cannot be rewritten and versions cannot be upgraded, another alternative is to limit the URL length.\n\n### References\n\n- [GHSA-9wv6-86v2-598j](https://github.com/advisories/GHSA-9wv6-86v2-598j)\n- [Detailed blog post: ReDoS the web](https://blakeembrey.com/posts/2024-09-web-redos/)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "path-to-regexp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.13"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pillarjs/path-to-regexp/security/advisories/GHSA-37ch-88jc-xwx2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-4867"
}, {
"type" : "WEB",
"url" : "https://blakeembrey.com/posts/2024-09-web-redos"
}, {
"type" : "WEB",
"url" : "https://cna.openjsf.org/security-advisories.html"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-9wv6-86v2-598j"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pillarjs/path-to-regexp"
}, {
"type" : "WEB",
"url" : "https://github.com/pillarjs/path-to-regexp/releases/tag/v.0.1.13"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-27T20:04:53Z",
"nvd_published_at" : "2026-03-26T17:16:42Z"
}
}