CVE-2024-52798
NoneCVSS
—
EPSS
0.8%
Published
Dec 5, 2024
CISA due date
—
Cloudanix analysis
A flaw in a common web routing component can let someone slow down or knock services offline by sending specially crafted web requests.
- 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 is a regular expression denial-of-service vulnerability in path-to-regexp 0.1.x. The library converts route path patterns into JavaScript regular expressions; in certain route configurations it can generate expressions with excessive backtracking behavior. A remote, unauthenticated attacker can send specially crafted request paths that match affected routes poorly and force the Node.js event loop to spend excessive CPU time evaluating the generated regular expression. The primary impact is availability loss: requests may become slow, worker processes may peg CPU, health checks may fail, and services may restart or stop responding. The issue is an incomplete fix for CVE-2024-45296.
Why it matters to the business
Applications that rely on vulnerable path-to-regexp versions for HTTP routing can be made slow or unavailable with network requests, potentially causing customer-facing outages, failed API calls, degraded service-level objectives, and increased infrastructure cost from autoscaling or restarts. The CVSS availability impact is high, but the current EPSS is low and it is not listed in CISA KEV or known ransomware use, so remediation should be prioritized based on internet exposure and dependency reach rather than active mass exploitation signals.
How an attack unfolds
An attacker first identifies an application or API endpoint whose routing stack uses path-to-regexp 0.1.x and contains a route pattern that compiles into a vulnerable backtracking regular expression. The attacker then sends HTTP requests with intentionally malformed, overlong, or near-matching path strings designed to trigger worst-case regular-expression evaluation. Because JavaScript regular expression execution can block the Node.js event loop, even a small number of requests may consume significant CPU and prevent legitimate requests from being processed. If the service is behind a load balancer or orchestrator, the visible symptoms may include elevated latency, upstream timeouts, 5xx responses, failed liveness probes, container restarts, or horizontal scaling without a corresponding increase in legitimate traffic.
How to fix it
Upgrade path-to-regexp 0.1.x to version 0.1.12 or later. For source-based remediation, use the fixed upstream commit 640e694c6fd971f78268439df9cf44040855e669 where applicable. Regenerate lockfiles and rebuild applications so the patched dependency is actually deployed, including transitive dependencies bundled through web frameworks. If vulnerability management tooling reports affected Ubuntu ImageMagick packages, apply the vendor-fixed packages: Ubuntu 14.04 LTS fixed in 8:6.7.7.10-6ubuntu3.2 and Ubuntu 16.04 LTS fixed in 8:6.8.9.9-7ubuntu5. Mitigations where immediate upgrade is not possible include enforcing maximum URL length at reverse proxies and application gateways, rejecting abnormal path patterns early, applying per-IP and per-route rate limits, isolating Node.js worker processes, and ensuring health checks and autoscaling do not amplify the impact of CPU exhaustion.
How to confirm the fix worked
Confirm that no deployed application resolves path-to-regexp to a vulnerable 0.1.x version below 0.1.12. Check package-lock.json, npm-shrinkwrap.json, yarn.lock, pnpm-lock.yaml, SBOMs, container images, and runtime node_modules directories. Validate with commands such as npm ls path-to-regexp, yarn why path-to-regexp, or pnpm why path-to-regexp in each application build context. After remediation, run dependency scans against rebuilt artifacts rather than only source repositories. Operationally, perform safe staging tests with long and malformed request paths against representative routes and verify that CPU usage, event-loop lag, latency, and error rates remain bounded. For Ubuntu packages, verify installed versions with dpkg -l or apt-cache policy and ensure the fixed vendor versions or later are installed.
Typical attack path
- Discover internet-facing web applications or APIs using Node.js routing frameworks or other software that bundles path-to-regexp 0.1.x.
- Identify routes whose path patterns are likely to compile into vulnerable regular expressions.
- Send crafted HTTP requests with long or pathological URL paths that nearly match affected route expressions.
- Force excessive regular-expression backtracking in the request-routing layer.
- Consume CPU and block request processing in the Node.js event loop.
- Repeat requests or distribute them across endpoints to sustain service degradation or outage.
How to detect it
To assess possible prior exploitation, review web server, reverse proxy, CDN, WAF, API gateway, and application logs for bursts of unusually long or malformed URL paths followed by latency increases, 499/502/503/504 responses, upstream timeout messages, failed health checks, or service restarts. Correlate these events with host and container telemetry showing high CPU in Node.js processes, elevated event-loop lag, increased garbage collection pressure, pod restarts, or autoscaling activity without matching legitimate traffic growth. Application performance monitoring traces may show time concentrated in routing or request dispatch before controller logic is reached. Because this vulnerability causes resource exhaustion rather than code execution, durable host artifacts are usually absent; detection depends mainly on traffic patterns and availability telemetry. There are no known named threat actors, KEV exploitation, or ransomware campaigns tied to this CVE in the supplied data.
- node_modules/path-to-regexp/package.json
- "path-to-regexp": "0.1.
- path-to-regexp@0.1.
- GET /%2F%2F%2F
- GET /aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- POST /aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- upstream timed out
- connect() failed (110: Connection timed out) while reading response header from upstream
- HTTP 503
- HTTP 504
- JavaScript heap out of memory
- event loop lag
- npm ls path-to-regexp
What your security team should do
- Inventory all applications, containers, and serverless functions that include path-to-regexp, especially transitive use through Express-compatible routing stacks.
- Prioritize patching internet-facing Node.js APIs and services where route matching occurs before authentication or rate limiting.
- Upgrade to path-to-regexp 0.1.12 or later, regenerate lockfiles, rebuild artifacts, and redeploy rather than relying on source manifest changes alone.
- Add reverse-proxy controls for maximum request URI length, request rate, and abnormal path rejection to reduce exposure to regex-based denial-of-service attacks.
- Monitor for Node.js CPU spikes, event-loop lag, upstream timeouts, and bursts of long unusual URL paths, even though there is no public KEV listing or known ransomware association.
- Review whether scanners are reporting distro package mappings such as Ubuntu ImageMagick and apply the corresponding vendor updates where those packages are present.
- Create regression tests for route patterns that accept broad or repeated path segments so future routing changes do not reintroduce catastrophic backtracking behavior.
The record
path-to-regexp turns path strings into a regular expressions. In certain cases, path-to-regexp will output a regular expression that can be exploited to cause poor performance. The regular expression that is vulnerable to backtracking can be generated in the 0.1.x release of path-to-regexp. Upgrade to 0.1.12. This vulnerability exists because of an incomplete fix for CVE-2024-45296.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | path-to-regexp | 0 | 0.1.12 |
| Chainguard | argo-workflow-cli | 0 | 3.6.2-r1 |
| Chainguard | argo-workflow-controller | 0 | 3.6.2-r1 |
| Chainguard | argo-workflow-controller-compat | 0 | 3.6.2-r1 |
| Chainguard | argo-workflow-executor | 0 | 3.6.2-r1 |
| Chainguard | argo-workflow-executor-compat | 0 | 3.6.2-r1 |
| Chainguard | argo-workflows | 0 | 3.6.2-r1 |
| Chainguard | argo-workflows-known-hosts | 0 | 3.6.2-r1 |
| Chainguard | argo-workflows-ui | 0 | 3.6.2-r1 |
| Chainguard | grafana-image-renderer | 0 | 3.11.6-r2 |
| Chainguard | kubeflow-centraldashboard | 0 | 1.9.2-r3 |
| Chainguard | kubeflow-pipelines | 0 | 2.3.0-r3 |
| Chainguard | kubeflow-pipelines-apiserver | 0 | 2.3.0-r3 |
| Chainguard | kubeflow-pipelines-cache-deployer | 0 | 2.3.0-r3 |
| Chainguard | kubeflow-pipelines-cache-deployer-compat | 0 | 2.3.0-r3 |
| Chainguard | kubeflow-pipelines-cache_server | 0 | 2.3.0-r3 |
| Chainguard | kubeflow-pipelines-frontend | 0 | 2.3.0-r3 |
| Chainguard | kubeflow-pipelines-metadata-envoy-config | 0 | 2.3.0-r3 |
| Chainguard | kubeflow-pipelines-metadata-writer | 0 | 2.3.0-r3 |
| Chainguard | kubeflow-pipelines-metadata-writer-compat | 0 | 2.3.0-r3 |
| Chainguard | kubeflow-pipelines-persistence_agent | 0 | 2.3.0-r3 |
| Chainguard | kubeflow-pipelines-scheduledworkflow | 0 | 2.3.0-r3 |
| Chainguard | kubeflow-pipelines-viewer-crd-controller | 0 | 2.3.0-r3 |
| Chainguard | sqlpad | 0 | 7.5.2-r0 |
| Chainguard | sqlpad-compat | 0 | 7.5.2-r0 |
| Chainguard | thingsboard | 0 | 3.8.1-r4 |
| Chainguard | thingsboard-tb-js-executor | 0 | 3.8.1-r4 |
| Chainguard | thingsboard-tb-mqtt-transport | 0 | 3.8.1-r4 |
| Chainguard | thingsboard-tb-node | 0 | 3.8.1-r4 |
| Chainguard | thingsboard-tb-web-ui | 0 | 3.8.1-r4 |
| Chainguard | tileserver-gl | 0 | 5.1.1-r0 |
| Chainguard | tileserver-gl-compat | 0 | 5.1.1-r0 |
| Chainguard | tileserver-gl-fips | 0 | 5.1.1-r0 |
| Chainguard | tileserver-gl-fips-compat | 0 | 5.1.1-r0 |
| Ubuntu:16.04:LTS | node-path-to-regexp | 0 | No fix |
| Ubuntu:18.04:LTS | node-path-to-regexp | 0 | No fix |
| Ubuntu:20.04:LTS | node-path-to-regexp | 0 | No fix |
| Ubuntu:22.04:LTS | node-path-to-regexp | 0 | No fix |
| Ubuntu:24.04:LTS | node-path-to-regexp | 0 | No fix |
| Ubuntu:24.10 | node-path-to-regexp | 0 | No fix |
| Ubuntu:25.04 | node-express | 0 | No fix |
| Ubuntu:25.04 | node-path-to-regexp | 0 | No fix |
| Ubuntu:25.10 | node-express | 0 | No fix |
| Ubuntu:25.10 | node-path-to-regexp | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | node-path-to-regexp | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | node-path-to-regexp | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | node-path-to-regexp | 0 | No fix |
| Wolfi | argo-workflow-cli | 0 | 3.6.2-r1 |
| Wolfi | argo-workflow-controller | 0 | 3.6.2-r1 |
| Wolfi | argo-workflow-controller-compat | 0 | 3.6.2-r1 |
| Wolfi | argo-workflow-executor | 0 | 3.6.2-r1 |
| Wolfi | argo-workflow-executor-compat | 0 | 3.6.2-r1 |
| Wolfi | argo-workflows | 0 | 3.6.2-r1 |
| Wolfi | argo-workflows-known-hosts | 0 | 3.6.2-r1 |
| Wolfi | argo-workflows-ui | 0 | 3.6.2-r1 |
| Wolfi | grafana-image-renderer | 0 | 3.11.6-r2 |
| Wolfi | kubeflow-centraldashboard | 0 | 1.9.2-r3 |
| Wolfi | kubeflow-pipelines | 0 | 2.3.0-r3 |
| Wolfi | kubeflow-pipelines-apiserver | 0 | 2.3.0-r3 |
| Wolfi | kubeflow-pipelines-cache-deployer | 0 | 2.3.0-r3 |
| Wolfi | kubeflow-pipelines-cache-deployer-compat | 0 | 2.3.0-r3 |
| Wolfi | kubeflow-pipelines-cache_server | 0 | 2.3.0-r3 |
| Wolfi | kubeflow-pipelines-frontend | 0 | 2.3.0-r3 |
| Wolfi | kubeflow-pipelines-metadata-envoy-config | 0 | 2.3.0-r3 |
| Wolfi | kubeflow-pipelines-metadata-writer | 0 | 2.3.0-r3 |
| Wolfi | kubeflow-pipelines-metadata-writer-compat | 0 | 2.3.0-r3 |
| Wolfi | kubeflow-pipelines-persistence_agent | 0 | 2.3.0-r3 |
| Wolfi | kubeflow-pipelines-scheduledworkflow | 0 | 2.3.0-r3 |
| Wolfi | kubeflow-pipelines-viewer-crd-controller | 0 | 2.3.0-r3 |
| Wolfi | sqlpad | 0 | 7.5.2-r0 |
| Wolfi | sqlpad-compat | 0 | 7.5.2-r0 |
| Wolfi | thingsboard | 0 | 3.8.1-r4 |
| Wolfi | thingsboard-tb-js-executor | 0 | 3.8.1-r4 |
| Wolfi | thingsboard-tb-mqtt-transport | 0 | 3.8.1-r4 |
| Wolfi | thingsboard-tb-node | 0 | 3.8.1-r4 |
| Wolfi | thingsboard-tb-web-ui | 0 | 3.8.1-r4 |
| Wolfi | tileserver-gl | 0 | 5.1.1-r0 |
| Wolfi | tileserver-gl-compat | 0 | 5.1.1-r0 |
Related vulnerabilities
- 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
- GHSA-37ch-88jc-xwx2 path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route… 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-2026-4867 Impact: A bad regular expression is generated any time you have three or more parameters… Also affects path-to-regexp
- CVE-2024-45296 path-to-regexp turns path strings into a regular expressions. Also affects path-to-regexp
- CVE-2025-47907 Cancelling a query (e.g. Also affects argo-workflow-cli