CVE-2026-4923: Path to regexp Denial of Service Vulnerability
MODERATECVE-2026-4923 is a MODERATE (CVSS 5.9) 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 wildcards. Remediation is available by upgrading affected packages to version 8.4.0.
CVE-2026-4923 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-4923
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@8.4.0
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-4923, 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 8.4.0), 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-4923 Affected Path to regexp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
path-to-regexp
|
npm |
≥ 8.0.0
< 8.4.0
|
8.4.0
|
References
Frequently Asked Questions
What is CVE-2026-4923?
Which Path to regexp versions are affected?
What version fixes CVE-2026-4923?
Is path-to-regexp affected?
What is the CVSS score of CVE-2026-4923?
What CWE is associated with CVE-2026-4923?
How can I check npm dependencies for CVE-2026-4923?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-27v5-c462-wpq7",
"modified" : "2026-03-27T22:23:52Z",
"published" : "2026-03-27T22:23:52Z",
"aliases" : [ "CVE-2026-4923" ],
"summary" : "path-to-regexp vulnerable to Regular Expression Denial of Service via multiple wildcards",
"details" : "### Impact\n\nWhen 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.\n\n**Unsafe examples:**\n\n```\n/*foo-*bar-:baz\n/*a-:b-*c-:d\n/x/*a-:b/*c/y\n```\n\n**Safe examples:**\n\n```\n/*foo-:bar\n/*foo-:bar-*baz\n```\n\n### Patches\n\nUpgrade to version `8.4.0`.\n\n### Workarounds\n\nIf 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/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" : "8.0.0"
}, {
"fixed" : "8.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pillarjs/path-to-regexp/security/advisories/GHSA-27v5-c462-wpq7"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-4923"
}, {
"type" : "WEB",
"url" : "https://cna.openjsf.org/security-advisories.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pillarjs/path-to-regexp"
}, {
"type" : "WEB",
"url" : "https://makenowjust-labs.github.io/recheck/playground"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-27T22:23:52Z",
"nvd_published_at" : "2026-03-26T19:17:08Z"
}
}