Cloudanix VulnDB

CVE-2024-45296

High · 7.5

CVSS

7.5

EPSS

0.9%

Published

Sep 9, 2024

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A software component used to route web requests can let specially crafted web addresses overload a service and make it slow or unavailable.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Medium

What it actually does

This is a regular-expression denial-of-service vulnerability in pillarjs/path-to-regexp, a library used to convert route path strings into JavaScript regular expressions. When an application defines a route segment containing two parameters separated by a character other than a period, such as a dash or other delimiter, affected versions can generate a regex with poor worst-case matching behavior. An unauthenticated remote requester may be able to send crafted URL paths that force expensive regex evaluation. Because regex matching in Node.js runs on the main JavaScript thread, a single expensive match can block the event loop, delaying or preventing the application from processing other requests. The impact is availability loss only; the flaw does not directly provide code execution, data disclosure, or data modification.

Why it matters to the business

Internet-facing Node.js services that use affected path-to-regexp versions may become slow or unavailable if exposed routes are susceptible and receive crafted requests. The operational effect can include elevated latency, request timeouts, failed health checks, autoscaling churn, degraded API availability, and potential service-level objective or contractual availability impact. The issue has a high availability CVSS impact but is not listed in CISA KEV, is not known to be used in ransomware campaigns, has low EPSS, and has no reported public exploit maturity in the provided data, so it should be prioritized as a resilience and dependency hygiene fix rather than treated as confirmed active exploitation.

How an attack unfolds

An attacker first identifies an application endpoint whose routing is built through an affected path-to-regexp version and whose route definition contains two parameters in a single path segment separated by a non-period delimiter. The attacker then sends specially shaped and often long URL paths that nearly match the generated route expression but trigger excessive backtracking or otherwise poor regex performance. Each malicious request can consume disproportionate CPU on the Node.js main thread while the application attempts to match the route. If repeated or combined with concurrency, these requests block the event loop, causing normal user requests to queue, time out, or fail. Successful exploitation results in denial of service for the affected process or service tier, not compromise of confidentiality or integrity.

How to fix it

Upgrade path-to-regexp to a fixed version. Users of the 0.1.x line should upgrade to 0.1.10. All other users should upgrade to 8.0.0 or later where compatible. The upstream Git fix is associated with commit c827fcea751b2e9ec6ca68a1b95a82e438728868. Because path-to-regexp is frequently present as a transitive dependency through web frameworks and routers, update both direct and transitive dependencies, regenerate lockfiles, and redeploy rebuilt artifacts. If immediate upgrade is not possible, review route definitions and avoid patterns with two parameters in the same segment separated by a non-period delimiter; split the segment, use a period separator where semantically safe, or replace ambiguous dynamic route patterns with stricter explicit validation. Add request-size limits, URL path length limits, rate limiting, and upstream timeout controls at reverse proxies, load balancers, and API gateways to reduce exploitability. Ensure Node.js services have process supervision and horizontal capacity so a blocked event loop does not take down an entire service.

How to confirm the fix worked

Confirm dependency resolution shows a fixed path-to-regexp version in package manifests and lockfiles: 0.1.10 for the 0.1 branch or 8.0.0 or later for other supported branches. Use package-manager tooling such as npm ls path-to-regexp, yarn why path-to-regexp, pnpm why path-to-regexp, or software composition analysis to verify there are no remaining vulnerable transitive copies in the deployed artifact. Review application route definitions for single path segments containing multiple parameters separated by non-period delimiters and confirm they were removed, changed, or protected. In a non-production test environment, exercise formerly susceptible routes with long malformed path inputs and verify that CPU usage, event-loop delay, and response latency remain bounded. Validate compensating controls by confirming maximum URL length, request rate limits, and gateway timeouts are enforced before requests reach the Node.js application.

Typical attack path

  1. Reconnoiter externally reachable Node.js or JavaScript-backed HTTP services and enumerate routes or infer route patterns from API behavior, documentation, client-side code, or error responses.
  2. Identify candidate routes that may correspond to path-to-regexp patterns with two parameters in one segment separated by a non-period delimiter, such as a dash-delimited pair.
  3. Send crafted long or edge-case URL paths to the candidate routes while observing response latency, timeout behavior, and server availability.
  4. Increase request length, repetition, or concurrency to amplify CPU consumption in regex matching.
  5. Cause the Node.js event loop to become blocked, resulting in degraded service, failed requests, or process restarts depending on the deployment and health-check configuration.

How to detect it

Retrospective exploitation detection is behavioral because there is no universal exploit payload: the malicious URL depends on each application’s route definitions. Review HTTP access logs, reverse proxy logs, CDN/WAF logs, API gateway logs, application logs, APM traces, and Node.js runtime metrics for periods of high CPU, elevated event-loop lag, request latency spikes, and increased 5xx or timeout responses that correlate with repeated long or unusual URL paths. Focus on routes that contain multiple dynamic-looking values in a single segment separated by a dash or other non-period delimiter. Look for repeated requests from the same source IPs, user agents, autonomous systems, or bot infrastructure that produce slow responses without high request volume. Examine container, orchestrator, and process-manager events for restarts, liveness probe failures, out-of-memory misattribution, or CPU throttling that occurred at the same time as suspicious path requests. If packet captures or WAF logs are available, search for very long path segments, high-entropy path components, excessive repeated characters, and malformed near-matches to known route patterns. Treat findings as suspected denial-of-service activity when abnormal URL patterns align temporally with event-loop blocking or availability degradation.

What your security team should do

  • Inventory applications and container images that include path-to-regexp, including transitive copies pulled in by routing frameworks.
  • Prioritize internet-facing Node.js services, APIs, developer portals, and edge services where route matching occurs before authentication or authorization.
  • Upgrade to path-to-regexp 0.1.10 for 0.1.x users or 8.0.0 or later for other users, then rebuild and redeploy affected services.
  • Search code repositories for route definitions with two parameters in one path segment separated by non-period delimiters and require safer route patterns during code review.
  • Add or verify upstream controls for maximum URL length, request rate limiting, per-request timeouts, and bot or abusive traffic filtering.
  • Monitor post-remediation for abnormal spikes in long URL paths, elevated event-loop delay, CPU saturation, HTTP 408/429/500/502/503/504 responses, and service restarts.
  • Because this issue is not KEV-listed and has low EPSS in the provided data, schedule remediation promptly through normal vulnerability management unless the affected service is business-critical or publicly exposed, in which case expedite.

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. Because JavaScript is single threaded and regex matching runs on the main thread, poor performance will block the event loop and lead to a DoS. The bad regular expression is generated any time you have two parameters within a single segment, separated by something that is not a period (.). For users of 0.1, upgrade to 0.1.10. All other users should upgrade to 8.0.0.

Affected packages

Ecosystem Package Introduced Fixed
npm path-to-regexp 0 0.1.10
npm path-to-regexp 0.2.0 1.9.0
npm path-to-regexp 2.0.0 3.3.0
npm path-to-regexp 4.0.0 6.3.0
npm path-to-regexp 7.0.0 8.0.0
Chainguard argo-workflow-cli 0 3.6.0-r1
Chainguard argo-workflow-controller 0 3.6.0-r1
Chainguard argo-workflow-controller-compat 0 3.6.0-r1
Chainguard argo-workflow-executor 0 3.6.0-r1
Chainguard argo-workflow-executor-compat 0 3.6.0-r1
Chainguard argo-workflows 0 3.6.0-r1
Chainguard argo-workflows-known-hosts 0 3.6.0-r1
Chainguard argo-workflows-ui 0 3.6.0-r1
Chainguard grafana-10.4 0 10.4.8-r3
Chainguard grafana-10.4-oci-compat 0 10.4.8-r3
Chainguard grafana-fips-10.4 0 10.4.8-r2
Chainguard grafana-fips-10.4-oci-compat 0 10.4.8-r2
Chainguard grafana-oci-compat 0 10.4.8-r3
Chainguard kibana-8 0 8.15.3-r0
Chainguard kibana-8-bitnami 0 8.15.3-r0
Chainguard kibana-8-iamguarded 0 8.15.3-r0
Chainguard kubeflow-centraldashboard 0 1.9.0-r3
Chainguard kubeflow-pipelines 0 2.2.0-r12
Chainguard kubeflow-pipelines-apiserver 0 2.2.0-r12
Chainguard kubeflow-pipelines-cache-deployer 0 2.2.0-r12
Chainguard kubeflow-pipelines-cache-deployer-compat 0 2.2.0-r12
Chainguard kubeflow-pipelines-cache_server 0 2.2.0-r12
Chainguard kubeflow-pipelines-frontend 0 2.2.0-r12
Chainguard kubeflow-pipelines-metadata-envoy-config 0 2.2.0-r12
Chainguard kubeflow-pipelines-metadata-writer 0 2.2.0-r12
Chainguard kubeflow-pipelines-metadata-writer-compat 0 2.2.0-r12
Chainguard kubeflow-pipelines-persistence_agent 0 2.2.0-r12
Chainguard kubeflow-pipelines-scheduledworkflow 0 2.2.0-r12
Chainguard kubeflow-pipelines-viewer-crd-controller 0 2.2.0-r12
Chainguard opensearch-dashboards-2 0 2.19.1-r3
Chainguard opensearch-dashboards-2-alerting-dashboards-plugin 0 2.19.1-r3
Chainguard opensearch-dashboards-2-anomaly-detection-dashboards-plugin 0 2.19.1-r3
Chainguard opensearch-dashboards-2-compat 0 2.19.1-r3
Chainguard opensearch-dashboards-2-config 0 2.19.1-r3
Chainguard opensearch-dashboards-2-dashboards-maps 0 2.19.1-r3
Chainguard opensearch-dashboards-2-dashboards-notifications 0 2.19.1-r3
Chainguard opensearch-dashboards-2-dashboards-observability 0 2.19.1-r3
Chainguard opensearch-dashboards-2-dashboards-query-workbench 0 2.19.1-r3
Chainguard opensearch-dashboards-2-dashboards-reporting 0 2.19.1-r3
Chainguard opensearch-dashboards-2-dashboards-search-relevance 0 2.19.1-r3
Chainguard opensearch-dashboards-2-dashboards-visualizations 0 2.19.1-r3
Chainguard opensearch-dashboards-2-fips 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-alerting-dashboards-plugin 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-anomaly-detection-dashboards-plugin 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-config 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-dashboards-maps 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-dashboards-notifications 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-dashboards-observability 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-dashboards-query-workbench 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-dashboards-reporting 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-dashboards-search-relevance 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-dashboards-visualizations 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-index-management-dashboards-plugin 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-ml-commons-dashboards 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-security-analytics-dashboards-plugin 0 2.17.1-r0
Chainguard opensearch-dashboards-2-fips-security-dashboards-plugin 0 2.17.1-r0
Chainguard opensearch-dashboards-2-index-management-dashboards-plugin 0 2.19.1-r3
Chainguard opensearch-dashboards-2-ml-commons-dashboards 0 2.19.1-r3
Chainguard opensearch-dashboards-2-security-analytics-dashboards-plugin 0 2.19.1-r3
Chainguard opensearch-dashboards-2-security-dashboards-plugin 0 2.19.1-r3
Chainguard sqlpad 0 7.5.0-r1
Chainguard sqlpad-compat 0 7.5.0-r1
Chainguard thingsboard 0 3.7-r2
Chainguard thingsboard-tb-js-executor 0 3.7-r2
Chainguard thingsboard-tb-mqtt-transport 0 3.7-r2
Chainguard thingsboard-tb-node 0 3.7-r2
Chainguard thingsboard-tb-web-ui 0 3.7-r2
Chainguard vitess-18 0 18.0.8-r16
Chainguard vitess-18-binaries 0 18.0.8-r16
Chainguard vitess-18.0 0 18.0.8-r0
Chainguard vitess-18.0-binaries 0 18.0.8-r0
Chainguard vitess-20 0 20.0.8-r8
Chainguard vitess-20-binaries 0 20.0.8-r8
Chainguard vitess-20-compat 0 20.0.8-r8
Chainguard vitess-20.0 0 20.0.3-r0
Chainguard vitess-20.0-binaries 0 20.0.3-r0
Chainguard vitess-20.0-compat 0 20.0.3-r0
Debian:11 node-path-to-regexp 0 No fix
Debian:12 node-path-to-regexp 0 No fix
Debian:13 node-path-to-regexp 0 6.3.0-1
Red Hat:ansible_automation_platform:2.4::el8 ansible-core 0 1:2.15.13-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 automation-controller-venv-tower 0 0:4.5.13-1.el8ap
Red Hat:ansible_automation_platform:2.4::el9 ansible-core 0 1:2.15.13-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 automation-controller-venv-tower 0 0:4.5.13-1.el9ap
Red Hat:ansible_automation_platform_developer:2.4::el8 ansible-core 0 1:2.15.13-1.el8ap
Red Hat:ansible_automation_platform_developer:2.4::el8 automation-controller-venv-tower 0 0:4.5.13-1.el8ap
Red Hat:ansible_automation_platform_developer:2.4::el9 ansible-core 0 1:2.15.13-1.el9ap
Red Hat:ansible_automation_platform_developer:2.4::el9 automation-controller-venv-tower 0 0:4.5.13-1.el9ap
Red Hat:ansible_automation_platform_inside:2.4::el8 ansible-core 0 1:2.15.13-1.el8ap
Red Hat:ansible_automation_platform_inside:2.4::el9 ansible-core 0 1:2.15.13-1.el9ap
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.0-r1
Wolfi argo-workflow-controller 0 3.6.0-r1
Wolfi argo-workflow-controller-compat 0 3.6.0-r1
Wolfi argo-workflow-executor 0 3.6.0-r1
Wolfi argo-workflow-executor-compat 0 3.6.0-r1
Wolfi argo-workflows 0 3.6.0-r1
Wolfi argo-workflows-known-hosts 0 3.6.0-r1
Wolfi argo-workflows-ui 0 3.6.0-r1
Wolfi grafana-10.4 0 10.4.8-r3
Wolfi grafana-oci-compat 0 10.4.8-r3
Wolfi kubeflow-centraldashboard 0 1.9.0-r3
Wolfi kubeflow-pipelines 0 2.2.0-r12
Wolfi kubeflow-pipelines-apiserver 0 2.2.0-r12
Wolfi kubeflow-pipelines-cache-deployer 0 2.2.0-r12
Wolfi kubeflow-pipelines-cache-deployer-compat 0 2.2.0-r12
Wolfi kubeflow-pipelines-cache_server 0 2.2.0-r12
Wolfi kubeflow-pipelines-frontend 0 2.2.0-r12
Wolfi kubeflow-pipelines-metadata-envoy-config 0 2.2.0-r12
Wolfi kubeflow-pipelines-metadata-writer 0 2.2.0-r12
Wolfi kubeflow-pipelines-metadata-writer-compat 0 2.2.0-r12
Wolfi kubeflow-pipelines-persistence_agent 0 2.2.0-r12
Wolfi kubeflow-pipelines-scheduledworkflow 0 2.2.0-r12
Wolfi kubeflow-pipelines-viewer-crd-controller 0 2.2.0-r12
Wolfi opensearch-dashboards-2 0 2.19.1-r3
Wolfi opensearch-dashboards-2-alerting-dashboards-plugin 0 2.19.1-r3
Wolfi opensearch-dashboards-2-anomaly-detection-dashboards-plugin 0 2.19.1-r3
Wolfi opensearch-dashboards-2-compat 0 2.19.1-r3
Wolfi opensearch-dashboards-2-config 0 2.19.1-r3
Wolfi opensearch-dashboards-2-dashboards-maps 0 2.19.1-r3
Wolfi opensearch-dashboards-2-dashboards-notifications 0 2.19.1-r3
Wolfi opensearch-dashboards-2-dashboards-observability 0 2.19.1-r3
Wolfi opensearch-dashboards-2-dashboards-query-workbench 0 2.19.1-r3
Wolfi opensearch-dashboards-2-dashboards-reporting 0 2.19.1-r3
Wolfi opensearch-dashboards-2-dashboards-search-relevance 0 2.19.1-r3
Wolfi opensearch-dashboards-2-dashboards-visualizations 0 2.19.1-r3
Wolfi opensearch-dashboards-2-index-management-dashboards-plugin 0 2.19.1-r3
Wolfi opensearch-dashboards-2-ml-commons-dashboards 0 2.19.1-r3
Wolfi opensearch-dashboards-2-security-analytics-dashboards-plugin 0 2.19.1-r3
Wolfi opensearch-dashboards-2-security-dashboards-plugin 0 2.19.1-r3
Wolfi sqlpad 0 7.5.0-r1
Wolfi sqlpad-compat 0 7.5.0-r1
Wolfi thingsboard 0 3.7-r2
Wolfi thingsboard-tb-js-executor 0 3.7-r2
Wolfi thingsboard-tb-mqtt-transport 0 3.7-r2
Wolfi thingsboard-tb-node 0 3.7-r2
Wolfi thingsboard-tb-web-ui 0 3.7-r2
Wolfi vitess-20 0 20.0.8-r8
Wolfi vitess-20-binaries 0 20.0.8-r8
Wolfi vitess-20-compat 0 20.0.8-r8
Wolfi vitess-20.0 0 20.0.3-r0
Wolfi vitess-20.0-binaries 0 20.0.3-r0
Wolfi vitess-20.0-compat 0 20.0.3-r0
openSUSE:Tumbleweed argocd-cli 0 2.12.4-1.1
openSUSE:Tumbleweed velociraptor 0 0.7.0.4.git142.862ef23-1.1

Related vulnerabilities