CVE-2026-4923
Medium · 5.9CVSS
5.9
EPSS
0.4%
Published
Mar 26, 2026
CISA due date
—
Cloudanix analysis
A flaw in a web routing library can let someone slow down or knock offline affected services by sending specially crafted web addresses.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- High
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
This is a regular expression denial-of-service vulnerability in pillarjs path-to-regexp. Certain route patterns containing multiple wildcards plus at least one named parameter can cause path-to-regexp to generate a regular expression with catastrophic backtracking behavior. The vulnerable condition requires a second wildcard that is not positioned at the end of the path. When an unauthenticated remote client sends a specially crafted URL path that nearly matches one of these generated route expressions, the application process can spend excessive CPU time evaluating the regex, degrading or blocking request handling. The impact is availability loss only; the flaw does not directly enable data disclosure, authentication bypass, or code execution.
Why it matters to the business
Applications that use vulnerable route patterns may become slow or unavailable when exposed to crafted HTTP requests. The operational impact can include elevated CPU usage, request timeouts, failed health checks, service degradation, autoscaling events, and denial of service for legitimate users. The CVSS score is moderate, EPSS is currently low, it is not listed in CISA KEV, and there is no known exploit maturity in the provided data, but internet-facing services using affected routing patterns should still be prioritized because exploitation is remote and does not require authentication.
How an attack unfolds
An attacker first identifies an application or API that uses path-to-regexp for routing and has route definitions matching the vulnerable shape: multiple wildcard parameters combined with at least one named parameter, where the second wildcard is not at the end of the path. The attacker then sends HTTP requests with long, carefully structured path strings that force the generated regular expression engine into excessive backtracking. Each malicious request consumes disproportionate CPU time in the application process while the router attempts to match the path. By repeating these requests or sending them concurrently, the attacker can exhaust worker capacity, cause high latency, trigger timeouts, and potentially make the service unavailable. Because the flaw affects routing evaluation, exploitation can occur before normal application-level authorization logic is reached.
How to fix it
Upgrade pillarjs path-to-regexp to version 8.4.0 or later wherever it is used directly or transitively. If immediate upgrade is not possible, review route definitions and remove or refactor vulnerable patterns containing multiple wildcards plus parameters, especially patterns where the second wildcard is not at the end of the path. Avoid route structures like /*foo-*bar-:baz, /*a-:b-*c-:d, and /x/*a-:b/*c/y. Prefer safer route forms such as a single wildcard combined with parameters, or place wildcard constructs so they do not generate ambiguous backtracking-heavy expressions. As an interim control, validate generated regular expressions with a ReDoS analysis tool, apply request path length limits, enforce rate limits, and configure upstream proxies or load balancers to reject excessively long or abnormal URL paths.
How to confirm the fix worked
Confirm that all deployed applications and build artifacts resolve pillarjs path-to-regexp to version 8.4.0 or later. Use package manager commands such as npm ls path-to-regexp, yarn why path-to-regexp, or pnpm why path-to-regexp to identify direct and transitive usage. Review application route definitions for vulnerable wildcard-plus-parameter combinations and confirm they have been removed, refactored, or regenerated using the fixed library. In staging, send representative long-path requests to formerly vulnerable routes and verify that CPU usage, latency, and error rates remain stable. Also confirm upstream protections such as path length limits and rate limits are active and do not break legitimate traffic.
Typical attack path
- Discover or infer that the target application uses routes generated by vulnerable versions of pillarjs path-to-regexp.
- Identify or guess endpoints whose route patterns contain multiple wildcards and at least one parameter, with the second wildcard not at the end of the path.
- Generate long URL paths designed to nearly match the vulnerable route expression and trigger catastrophic backtracking.
- Send crafted HTTP requests repeatedly or concurrently to the vulnerable endpoint.
- Cause high CPU usage in the application process, increased response latency, request timeouts, failed health checks, or service unavailability.
How to detect it
Look for evidence of attempted or successful denial of service rather than file-based compromise. Relevant sources include reverse proxy logs, CDN/WAF logs, web server access logs, application logs, APM traces, container or host CPU metrics, event-loop latency metrics for Node.js applications, load balancer health-check logs, and autoscaling events. Hunt for repeated requests with unusually long URL paths, high request rates to the same endpoint, requests that produce long response times or upstream timeouts, and clusters of 408, 429, 499, 500, 502, 503, or 504 responses. Correlate these requests with spikes in CPU utilization, Node.js event-loop delay, process restarts, failed readiness/liveness probes, and degraded response latency. Review deployed route patterns for exposure; exploitation is most plausible where unsafe patterns with multiple wildcards and parameters are reachable from untrusted clients. There are no known named threat actors, KEV listing, ransomware usage, or public exploit maturity in the supplied data, so prioritize behavioral detection over signature-only detection.
What your security team should do
- Inventory all applications, APIs, frameworks, and middleware that include pillarjs path-to-regexp, including transitive dependencies bundled through web frameworks.
- Upgrade affected dependency trees to path-to-regexp 8.4.0 or later and redeploy affected services.
- Prioritize internet-facing services and high-traffic APIs because the issue can be triggered remotely without authentication.
- Search route definitions for multiple wildcard parameters combined with named parameters, especially where the second wildcard is not at the end of the route.
- Temporarily mitigate with request path length limits, rate limiting, WAF or reverse-proxy rules for abnormal long paths, and autoscaling/health-check monitoring until upgrades are complete.
- Monitor application CPU saturation, event-loop delay, request latency, 408/429/499/500/502/503/504 responses, and repeated long URL path requests to detect attempted denial-of-service activity.
- Add regression tests or static checks to prevent introduction of unsafe route patterns in future releases.
The record
Impact: When 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. Unsafe examples: /*foo-*bar-:baz /*a-:b-*c-:d /x/*a-:b/*c/y Safe examples: /*foo-:bar /*foo-:bar-*baz Patches: Upgrade to version 8.4.0. Workarounds: If you are using multiple wildcard parameters, you can check the regex output with a tool such as https://makenowjust-labs.github.io/recheck/playground/ to confirm whether a path is vulnerable.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | path-to-regexp | 8.0.0 | 8.4.0 |
| Chainguard | code-server | 0 | 4.112.0-r2 |
| Chainguard | gemini-cli | 0 | 0.35.3-r0 |
| Chainguard | opensearch-dashboards-2 | 0 | 2.19.5-r6 |
| Chainguard | opensearch-dashboards-2-fips | 0 | 2.19.5-r5 |
| Chainguard | redisinsight | 0 | 3.2.0-r4 |
| Chainguard | thingsboard-tb-js-executor | 0 | 4.3.1.1-r0 |
| Chainguard | thingsboard-tb-web-ui | 0 | 4.3.1.1-r0 |
| Chainguard | tileserver-gl | 0 | 5.5.0-r12 |
| Chainguard | tileserver-gl-fips | 0 | 5.5.0-r12 |
| Chainguard | wazuh-dashboard | 0 | 4.14.4-r1 |
| Wolfi | code-server | 0 | 4.112.0-r2 |
| Wolfi | opensearch-dashboards-2 | 0 | 2.19.5-r6 |
| Wolfi | thingsboard-tb-js-executor | 0 | 4.3.1.1-r0 |
| Wolfi | thingsboard-tb-web-ui | 0 | 4.3.1.1-r0 |
| Wolfi | tileserver-gl | 0 | 5.5.0-r12 |
Related vulnerabilities
- GHSA-27v5-c462-wpq7 path-to-regexp vulnerable to Regular Expression Denial of Service via multiple wildcards Same vulnerability
- GHSA-j3q9-mxjg-w52f path-to-regexp vulnerable to Denial of Service via sequential optional groups Also affects path-to-regexp
- GHSA-37ch-88jc-xwx2 path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route… 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-2026-4867 Impact: A bad regular expression is generated any time you have three or more parameters… 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-r5fr-rjxr-66jc lodash vulnerable to Code Injection via `_.template` imports key names Also affects code-server