CVE-2026-4867
High · 7.5CVSS
7.5
EPSS
0.6%
Published
Mar 26, 2026
CISA due date
—
Cloudanix analysis
A flaw in a common web routing library can let outsiders make affected websites or APIs slow down or stop responding by sending specially crafted web addresses.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
This vulnerability is a regular expression denial-of-service flaw in pillarjs path-to-regexp. When an application defines a route segment containing three or more parameters separated by a non-period character, such as /:a-:b-:c, the library can generate an ambiguous regular expression. The backtracking protection introduced in path-to-regexp 0.1.12 only addresses ambiguity involving two parameters; with three or more parameters, overlapping capture groups can trigger catastrophic backtracking when processing crafted request paths. A remote unauthenticated attacker can send specially constructed URLs that consume excessive CPU during route matching, causing high latency or denial of service. The issue affects availability only; it does not directly provide code execution, data access, or privilege escalation.
Why it matters to the business
Public-facing web applications, APIs, and services that use affected path-to-regexp route definitions may become slow or unavailable if attackers send maliciously crafted URLs. The operational impact can include failed customer requests, API outages, increased infrastructure costs from CPU exhaustion, autoscaling events, degraded service-level objectives, and noisy incident response. The current EPSS score is low and it is not listed in CISA KEV or reported as ransomware-used, but the vulnerability is network-exploitable, unauthenticated, low-complexity, and can affect widely deployed JavaScript web stacks, so internet-facing services should still be remediated promptly.
How an attack unfolds
An attacker first identifies an application endpoint whose routing layer uses path-to-regexp and contains a vulnerable route pattern with three or more parameters in a single path segment separated by a character other than a period, for example hyphens. The attacker then sends long or carefully shaped path strings to that endpoint so that the generated regular expression attempts many overlapping matches. Because the capture groups are ambiguous, the regular expression engine performs excessive backtracking before rejecting or resolving the route. Repeating these requests, or sending them concurrently, can pin server CPU and slow or block request handling for legitimate users. No authentication or user interaction is required if the vulnerable route is exposed publicly.
How to fix it
Upgrade pillarjs path-to-regexp to version 0.1.13 or later where available. If using a framework or transitive dependency that bundles path-to-regexp, upgrade the parent framework/package to a version that includes path-to-regexp 0.1.13 or a fixed equivalent. Review route definitions for single path segments containing three or more parameters separated by non-period delimiters, such as /:a-:b-:c or /:a-:b-:c-:d. As a workaround, rewrite vulnerable routes to use custom regular expressions for parameters after the first so they cannot match the separator text, for example /:a-:b([^-/]+)-:c([^-/]+). Custom regex patterns that safely constrain the parameter content are not affected. If immediate code changes are not possible, enforce conservative URL length limits at the reverse proxy, load balancer, WAF, or application layer, and consider rate limiting anomalous requests to affected routes.
How to confirm the fix worked
Confirm dependency resolution shows path-to-regexp 0.1.13 or later, including transitive dependency lockfiles such as package-lock.json, yarn.lock, pnpm-lock.yaml, or npm ls output. Review application route definitions and generated routes for patterns with three or more parameters in a single segment separated by non-period characters. Validate that such routes have been removed, rewritten with safe custom regex constraints, or are no longer reachable. In staging, test representative long malformed URL paths against formerly vulnerable routes and confirm they are rejected quickly without excessive CPU usage or request latency. Confirm reverse proxy, WAF, or application URL length controls are active if used as mitigation.
Typical attack path
- Identify a web application or API using path-to-regexp-based routing, commonly in Node.js/Express-style stacks.
- Find or infer routes with three or more parameters in one segment separated by a non-period character, such as /:a-:b-:c.
- Send crafted long URL paths targeting the vulnerable route shape to trigger catastrophic regex backtracking during route matching.
- Repeat requests or distribute them across connections to sustain high CPU consumption.
- Cause degraded response times, request timeouts, service instability, or outage.
How to detect it
To determine whether exploitation has already occurred, review web server, reverse proxy, CDN, WAF, and application access logs for unusually long request paths targeting endpoints that resemble multi-parameter route segments, especially paths containing repeated hyphen-separated values in a single segment. Correlate suspicious requests with application CPU spikes, event-loop delay, request timeouts, elevated 502/503/504 responses, container restarts, autoscaling events, or Node.js process saturation. Look for bursts of unauthenticated requests from the same source or distributed sources where the URI path is much longer than normal and contains repeated separator-delimited tokens. Application logs may not show a stack trace because the impact occurs during route matching, but performance monitoring may show long request durations before routing or handler execution. If available, use APM traces, Node.js CPU profiles, reverse proxy timing fields, and WAF logs to identify whether long path requests coincide with degraded availability.
- path-to-regexp@0.1.12
- /:a-:b-:c
- /:a-:b-:c-:d
- /[^ ?]{2000,}
- /[^/ ?]+-[^/ ?]+-[^/ ?]+-[^/ ?]+
- HTTP 414
- HTTP 502
- HTTP 503
- HTTP 504
- upstream timed out
- request timed out
- Node.js event loop delay
- npm ls path-to-regexp
What your security team should do
- Inventory applications and APIs that depend on pillarjs path-to-regexp directly or through Node.js web frameworks.
- Prioritize internet-facing services and high-traffic APIs for upgrade to path-to-regexp 0.1.13 or a parent package version that includes the fix.
- Search source code and route registries for single-segment route patterns with three or more colon parameters separated by hyphens or other non-period delimiters.
- Apply safe route rewrites using explicit custom regex constraints where immediate dependency upgrades are blocked.
- Deploy URL length limits and request rate limiting as compensating controls for exposed services until code fixes are complete.
- Monitor access logs and application performance metrics for spikes in long malformed URL paths, elevated 4xx/5xx responses, request timeouts, and CPU saturation.
- Because this is not currently KEV-listed and has low EPSS, treat it as priority remediation for exposed or performance-sensitive services rather than an emergency across all assets.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | path-to-regexp | 0 | 0.1.13 |
| Chainguard | argo-workflows-ui-3.6 | 0 | 3.6.19-r5 |
| Chainguard | argo-workflows-ui-3.7 | 0 | 3.7.12-r2 |
| Chainguard | argo-workflows-ui-4.0 | 0 | 4.0.3-r2 |
| Chainguard | json-server | 0 | 0.17.4-r6 |
| Chainguard | kubeflow-pipelines-frontend | 0 | 2.16.0-r12 |
| Chainguard | langfuse-2 | 0 | 2.95.12-r17 |
| Chainguard | langfuse-2-worker | 0 | 2.95.12-r17 |
| Chainguard | langfuse-fips-2 | 0 | 2.95.12-r20 |
| Chainguard | langfuse-fips-2-worker | 0 | 2.95.12-r20 |
| Chainguard | pelias-api | 0 | 7.6.0-r5 |
| Chainguard | thingsboard-tb-js-executor-fips | 0 | 4.3.1.1-r0 |
| Chainguard | thingsboard-tb-web-ui-fips | 0 | 4.3.1.1-r0 |
| Wolfi | argo-workflows-ui-3.7 | 0 | 3.7.12-r2 |
| Wolfi | argo-workflows-ui-4.0 | 0 | 4.0.3-r2 |
| Wolfi | json-server | 0 | 0.17.4-r6 |
| Wolfi | kubeflow-pipelines-frontend | 0 | 2.16.0-r12 |
Related vulnerabilities
- GHSA-37ch-88jc-xwx2 path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route… Same vulnerability
- GHSA-27v5-c462-wpq7 path-to-regexp vulnerable to Regular Expression Denial of Service via multiple wildcards Also affects path-to-regexp
- GHSA-j3q9-mxjg-w52f path-to-regexp vulnerable to Denial of Service via sequential optional groups Also affects path-to-regexp
- CVE-2026-4923 Impact: When using multiple wildcards, combined with at least one parameter, a regular… Also affects path-to-regexp
- CVE-2026-4926 Impact: A bad regular expression is generated any time you have multiple sequential… Also affects path-to-regexp
- CVE-2024-52798 path-to-regexp turns path strings into a regular expressions. Also affects path-to-regexp
- CVE-2024-45296 path-to-regexp turns path strings into a regular expressions. Also affects path-to-regexp
- GHSA-f23m-r3pf-42rh lodash vulnerable to Prototype Pollution via array path bypass in `_.unset` and `_.omit` Also affects argo-workflows-ui-3.6