CVE-2026-4867: Path to regexp Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-37ch-88jc-xwx2
CVSS 7.5
CWE-1333
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-4867
GHSA Identifier GHSA-37ch-88jc-xwx2
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Path to regexp
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (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.

path-to-regexp fixed: 0.1.13
npm install path-to-regexp@0.1.13
Verify Direct and Transitive Dependencies

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

### 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](https://github.com/pillarjs/path-to-regexp/releases/tag/v.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 - [GHSA-9wv6-86v2-598j](https://github.com/advisories/GHSA-9wv6-86v2-598j) - [Detailed blog post: ReDoS the web](https://blakeembrey.com/posts/2024-09-web-redos/)

CVE-2026-4867 Affected Path to regexp Versions

1 component(s)
Fixed Versions:
0.1.13
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?
CVE-2026-4867 is a security vulnerability in Path to regexp involving path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route parameters under CWE-1333: Inefficient Regular Expression Complexity.
Which Path to regexp versions are affected?
Affected versions include releases prior to 0.1.13 across affected packages: path-to-regexp.
What version fixes CVE-2026-4867?
Upgrading to 0.1.13 (or the latest patched release for your respective branch) resolves the vulnerability.
Is path-to-regexp affected?
Yes, path-to-regexp is affected in releases prior to 0.1.13. Upgrade your dependency to 0.1.13 or later.
What is the CVSS score of CVE-2026-4867?
CVE-2026-4867 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-4867?
CVE-2026-4867 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for CVE-2026-4867?
Run the dependency tree command: 'npm ls path-to-regexp'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}