http-proxy-middleware
CVE-2024-21536
HIGH
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-reachable, no auth, no interaction needed; only availability is impacted as the process crashes but no data is accessed or modified.
Primary rating from Vendor (snyk).
CVSS VectorVendor: snyk
Lifecycle Timeline
5Blast Radius
ecosystem impact- 60 npm packages depend on http-proxy-middleware (13 direct, 47 indirect)
Ecosystem-wide dependent count for version 3.0.0.
DescriptionCVE.org
Versions of the package http-proxy-middleware before 2.0.7, from 3.0.0 and before 3.0.3 are vulnerable to Denial of Service (DoS) due to an UnhandledPromiseRejection error thrown by micromatch. An attacker could kill the Node.js process and crash the server by making requests to certain paths.
AnalysisAI
Denial of service in http-proxy-middleware allows unauthenticated remote attackers to crash the Node.js process by sending HTTP requests to specific paths that trigger an unhandled Promise rejection in the underlying micromatch path-matching library. Affected versions span the 2.x line (before 2.0.7) and the 3.x line (3.0.0 through before 3.0.3). A publicly available proof-of-concept exploit exists, and the CVSS 4.0 vector confirms full availability impact with no privileges or user interaction required, making this straightforward to weaponize against any exposed Node.js service using the middleware.
Technical ContextAI
http-proxy-middleware (CPE: cpe:2.3:a:chimurai:http-proxy-middleware) is a widely-used Node.js middleware that proxies HTTP requests based on path filter rules, relying on the micromatch library for glob-pattern matching. The root cause (CWE-400: Uncontrolled Resource Consumption) is a missing error boundary around the context-matching call: when micromatch throws synchronously on certain path inputs, the error escapes as an unhandled Promise rejection. In Node.js, uncaught Promise rejections can terminate the entire process (behavior enforced by default since Node.js 15). The fix, visible in commit 0b4274e, wraps the contextMatcher.match() call in a try-catch, logging the error and returning false rather than allowing the exception to propagate. The vulnerable code path is in src/http-proxy-middleware.ts in the shouldProxy() method.
RemediationAI
Upgrade http-proxy-middleware to version 2.0.7 or later on the 2.x branch, or to 3.0.3 or later on the 3.x branch. The upstream fix is confirmed in commits 0b4274e and 788b21e4 on the chimurai/http-proxy-middleware GitHub repository. As a compensating control where immediate upgrade is not feasible, restrict access to the proxied service at the network or load-balancer layer so that arbitrary path inputs cannot reach the Node.js process. Additionally, configuring a process manager (such as PM2 or systemd) with automatic restart on crash reduces availability impact but does not eliminate the vulnerability. Note that auto-restart mitigates downtime but still permits repeated denial-of-service loops by a persistent attacker. No known configuration-level workaround removes the underlying flaw without patching.
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic
The AES-NI implementation in OpenSSL before 1.0.1t and 1.0.2 before 1.0.2h does not consider memory allocation during a
Same weakness CWE-400 – Uncontrolled Resource Consumption
View allSame technique Denial Of Service
View allShare
External POC / Exploit Code
Leaving vuln.today