
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-140102 is a Denial of Service vulnerability in http-proxy-middleware, a widely used Node.js HTTP proxy middleware package. When ws: true is enabled, an HTTP Upgrade request whose path does not match the configured pathFilter leaves the raw socket without an error listener attached. A remote unauthenticated attacker can exploit this by sending such a crafted Upgrade request and then resetting the TCP connection, triggering an unhandled ECONNRESET error that terminates the entire gateway Node.js process — even when on.error, server.on('error'), and server.on('clientError') callbacks are configured. Affected versions span from 0.8.0 up to (but not including) 2.0.12, 3.0.11, and 4.2.2. The vulnerability carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory).
The root cause is classified as CWE-248 (Uncaught Exception): when the middleware's handleUpgrade function processes an Upgrade request whose path does not match pathFilter, it returns early without attaching an error listener to the raw TCP socket. This means any subsequent socket-level error (such as an ECONNRESET from a TCP RST) is emitted as an unhandled Node.js 'error' event, which by default throws and crashes the process. The fix, implemented in PRs #1328, #1329, and #1330, introduces a guardUpgradeSocket() helper that attaches a temporary error listener to every upgrade socket — matched or unmatched — before path filtering occurs, and removes it only after httpxy installs its own listener upon a successful matched upgrade (GitHub Advisory, Fix PR #1330). Exploitation requires no authentication and no user interaction; the only preconditions are that the target server uses http-proxy-middleware with ws: true, forwards 'upgrade' events to proxy.upgrade, and is reachable over the network on its listening port.
Successful exploitation results in a complete crash of the Node.js gateway process, causing a full denial of service for all clients relying on that gateway. There is no confidentiality or integrity impact — the vulnerability is purely an availability issue. Because a single crafted request is sufficient to terminate the process, an attacker can repeatedly crash the service, preventing recovery without process supervision or automatic restart mechanisms in place (GitHub Advisory).
A public proof-of-concept (PoC) exploit is available in the GitHub Security Advisory, consisting of a short Node.js client script that opens a raw TCP connection, sends a crafted HTTP Upgrade request to a non-matching path, and calls socket.resetAndDestroy() after 100 ms to trigger the crash (GitHub Advisory). The exploit requires no authentication, no privileges, and no user interaction, making it trivially weaponizable. As of the time of disclosure, there is no evidence of in-the-wild exploitation, no known threat actor attribution, and the EPSS score is reported as 0.0. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
http-proxy-middleware (versions >= 0.8.0, < 2.0.12 / 3.0.11 / 4.2.2) with ws: true enabled and server.on('upgrade', proxy.upgrade) configured. The server must be reachable over the network.net.connect() or a raw socket tool, establish a TCP connection to the gateway's listening port (e.g., net.connect(5056, '127.0.0.1', ...)).pathFilter (e.g., GET / when pathFilter is /ws):GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: Upgrade\r\nUpgrade: websocket\r\n\r\nsocket.resetAndDestroy(). This causes the server-side socket — which has no error listener attached — to emit an unhandled ECONNRESET error.'error' event and terminates, producing output similar to:Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:221:20)
Emitted 'error' event on Socket instance ...
throw er; // Unhandled 'error' eventThe entire gateway is now unavailable until restarted (GitHub Advisory).Connection: Upgrade and Upgrade: websocket headers) targeting paths that do not match the application's configured WebSocket route (e.g., GET / instead of GET /ws); TCP RST packets from external clients shortly after sending an Upgrade request.Error: read ECONNRESET and Emitted 'error' event on Socket instance; gateway process exit events logged by a process manager (e.g., PM2, systemd) indicating unexpected restarts.Upgrade http-proxy-middleware to one of the patched versions: 2.0.12, 3.0.11, or 4.2.2, depending on the currently deployed major version branch. The fix hardens the handleUpgrade function by attaching a temporary error listener to every upgrade socket before path filtering, preventing unhandled ECONNRESET errors from crashing the process (Fix PR #1328, Fix PR #1329, Fix PR #1330). As a short-term workaround prior to patching, consider placing a network-level firewall or reverse proxy (e.g., nginx) in front of the gateway to filter or rate-limit unexpected Upgrade requests, and ensure a process supervisor (PM2, systemd) is configured to automatically restart the gateway on crash.
The vulnerability was reported by security researcher samuel871211 with AI-assisted code analysis (Claude Code) and was published as a GitHub Security Advisory on November 22, 2026. The maintainer (chimurai) merged fixes across all three active branches on November 15, 2026 — prior to the public advisory — indicating a coordinated disclosure process. The advisory notes that AI assistance was used for code analysis, PoC drafting, and report writing, with the researcher manually verifying all findings (GitHub Advisory). Coverage appeared on automated vulnerability tracking platforms shortly after NVD publication, with no significant broader media or community discussion identified at the time of this report.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."