CVE-2026-140102: http-proxy-middleware: Unauthenticated remote gateway crash via an `Upgrade` request to a path outside `pathFilter` followed by a TCP RST (ws: true)
http-proxy-middleware is node.js http-proxy middleware. From 0.8.0 until 2.0.12, 3.0.11, and 4.2.2, an Upgrade request whose path does not match pathFilter can leave the raw socket without an error listener when ws: true is enabled. A remote unauthenticated client can send such an Upgrade request and reset the TCP connection, causing an unhandled ECONNRESET error that terminates the gateway process even when middleware and server error callbacks are configured. This issue is fixed in versions 2.0.12, 3.0.11, and 4.2.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.0.12 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.0.11 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.2.2
Event History
Frequently Asked Questions
Which deployments are exposed to this denial-of-service condition?
Deployments using http-proxy-middleware with ws: true enabled are exposed if they run a version from 0.8.0 through versions before 2.0.12, 3.0.11, or 4.2.2. The triggering Upgrade request must use a path that does not match pathFilter.
Does an attacker need credentials or user interaction to crash the gateway?
No. A remote unauthenticated client can trigger the issue by sending the relevant Upgrade request and then resetting the TCP connection.
Will existing middleware or server error callbacks prevent the process termination?
No. The gateway can terminate from an unhandled ECONNRESET error even when middleware and server error callbacks are configured.
What versions contain the fix?
The issue is fixed in http-proxy-middleware versions 2.0.12, 3.0.11, and 4.2.2.