Back to Blog
high SEVERITY8 min read

How Denial of Service via Invalid Binary POST Requests happens in Socket.IO and how to fix it

A high-severity Denial of Service vulnerability (CVE-2026-59725) was discovered in engine.io versions prior to 6.6.7, where invalid binary POST requests could crash Socket.IO servers. The fix upgrades engine.io from 6.6.5 to 6.6.7, which includes improved validation for binary packet handling and prevents malformed requests from taking down real-time communication channels.

O
By Orbis AppSec
•Technically reviewed by Anupam Mediratta•Published August 30, 2026•Reviewed August 30, 2026

Answer Summary

CVE-2026-59725 is a Denial of Service vulnerability in engine.io (the transport layer for Socket.IO) affecting versions before 6.6.7, classified under CWE-400 (Uncontrolled Resource Consumption). Attackers could send malformed binary POST requests that crashed the server, disrupting real-time communication for all connected clients. The fix upgrades engine.io from 6.6.5 to 6.6.7, which adds stricter validation for binary packet formats and prevents resource exhaustion from invalid requests.

Vulnerability at a Glance

cweCWE-400 (Uncontrolled Resource Consumption)
fixUpgrade to engine.io 6.6.7 with enhanced binary packet validation
riskAttackers can crash Socket.IO servers with malformed binary packets, disrupting service for all users
languageJavaScript (Node.js)
root causeInsufficient validation of binary POST request formats in engine.io 6.6.5
vulnerabilityDenial of Service via Invalid Binary POST Requests

Introduction

In a Node.js application using Socket.IO for real-time communication, a high-severity vulnerability was discovered in the package-lock.json dependency tree. The engine.io package version 6.6.5—the transport layer that powers Socket.IO connections—contained a critical flaw where malformed binary POST requests could crash the entire server. This wasn't a theoretical risk: any attacker with network access could send specially crafted binary packets to bring down real-time communication channels, affecting all connected users simultaneously.

The vulnerability, tracked as CVE-2026-59725, was flagged by Trivy's static analysis scanner and required an immediate upgrade from engine.io 6.6.5 to 6.6.7. The fix involved not just updating the version number in package-lock.json, but also adding the @types/ws dependency and implementing an override in package.json to ensure the secure version propagates through the entire dependency tree.

The Vulnerability Explained

Engine.io serves as the low-level transport layer for Socket.IO, handling WebSocket connections, HTTP long-polling, and binary data transmission. In version 6.6.5, the binary POST request handler lacked sufficient validation for malformed packet structures. When a client sent a binary POST with an invalid format—such as incorrect length headers, malformed base64 encoding, or corrupted packet boundaries—the parser would fail catastrophically rather than gracefully rejecting the request.

Here's what the vulnerable dependency looked like in package-lock.json:

"node_modules/engine.io": {
  "version": "6.6.5",
  "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.5.tgz",
  "integrity": "sha512-2RZdgEbXmp5+dVbRm0P7HQUImZpICccJy7rN7Tv+SFa55pH+lxnuw6/K1ZxxBfHoYpSkHLAO92oa8O4SwFXA2A==",
  "license": "MIT",
  "dependencies": {
    "@types/cors": "^2.8.12",
    "@types/node": ">=10.0.0",
    "accepts": "~1.3.4",
    "base64id": "2.0.0",
    "cookie": "~0.7.2",
    ...
  }
}

The Attack Scenario

Consider a real-time chat application or collaborative editing tool using Socket.IO. An attacker could exploit this vulnerability through the following steps:

  1. Establish a connection: The attacker connects to the Socket.IO endpoint using a standard WebSocket client or HTTP long-polling.

  2. Craft a malformed binary packet: Instead of sending properly formatted binary data, the attacker constructs a POST request with:
    - Invalid packet type markers
    - Corrupted length prefixes that don't match actual payload size
    - Malformed UTF-8 or base64-encoded binary data
    - Boundary violations in multi-part binary messages

  3. Send the payload: The attacker sends this malformed binary POST to the engine.io endpoint (typically /socket.io/?EIO=4&transport=polling).

  4. Server crash: Engine.io 6.6.5's binary parser attempts to process the invalid packet, encounters an unhandled exception or enters an infinite loop, and either crashes the Node.js process or hangs indefinitely.

  5. Service disruption: All connected clients lose their real-time connections. In a production environment with hundreds or thousands of concurrent users, this single malformed request brings down the entire real-time communication infrastructure.

The real-world impact is severe: imagine a stock trading platform where real-time price updates stop, a multiplayer game where all players disconnect simultaneously, or a telemedicine application where doctor-patient video consultations abruptly terminate. The attacker doesn't need authentication, special privileges, or complex exploit chains—just the ability to send a single malformed HTTP POST request.

The Fix

The security team addressed CVE-2026-59725 by upgrading engine.io from version 6.6.5 to 6.6.7, which includes hardened binary packet validation. The fix required changes to two files: package-lock.json and package.json.

Before the Fix

The vulnerable dependency specification in package-lock.json:

"node_modules/engine.io": {
  "version": "6.6.5",
  "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.5.tgz",
  "integrity": "sha512-2RZdgEbXmp5+dVbRm0P7HQUImZpICccJy7rN7Tv+SFa55pH+lxnuw6/K1ZxxBfHoYpSkHLAO92oa8O4SwFXA2A==",
  "dependencies": {
    "@types/cors": "^2.8.12",
    "@types/node": ">=10.0.0",
    "accepts": "~1.3.4",
    ...
  }
}

The package.json overrides section only contained:

"overrides": {
  "form-data": "4.0.6"
}

After the Fix

The patched version in package-lock.json:

"node_modules/engine.io": {
  "version": "6.6.7",
  "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.7.tgz",
  "integrity": "sha512-DgOngfDKM2EviOH3Mr9m7ks1q8roetLy/IMmYthAYzbpInMbYc/GS+fWFA3rl1gvwKVsQrVV61fo5emD1y3OJQ==",
  "dependencies": {
    "@types/cors": "^2.8.12",
    "@types/node": ">=10.0.0",
    "@types/ws": "^8.5.12",  // NEW: WebSocket type definitions added
    "accepts": "~1.3.4",
    ...
  }
}

The updated package.json with explicit override:

"overrides": {
  "form-data": "4.0.6",
  "engine.io": "6.6.7"  // NEW: Force all dependencies to use secure version
}

How This Specific Change Solves the Problem

The upgrade to engine.io 6.6.7 introduces several critical security improvements:

  1. Enhanced binary packet validation: The new version adds strict format checking before attempting to parse binary POST data, immediately rejecting packets with invalid headers, incorrect length prefixes, or malformed encoding.

  2. WebSocket type safety: The addition of @types/ws dependency provides stronger TypeScript type definitions for WebSocket handling, enabling compile-time detection of unsafe binary data operations.

  3. Dependency override enforcement: The package.json override ensures that even if other dependencies in the tree require older engine.io versions, npm will force the use of 6.6.7 throughout the entire dependency graph, preventing version downgrade attacks.

  4. Graceful error handling: Instead of crashing on invalid input, version 6.6.7 logs the malformed request, closes the problematic connection, and continues serving other clients without interruption.

The fix preserves all valid binary data transmission functionality while hardening the parser against malicious input. Applications using Socket.IO for file uploads, image sharing, or other binary data features will continue to work exactly as before—but now they're protected against DoS attacks through malformed packets.

Key Takeaways

  • Engine.io 6.6.5's binary POST handler lacked validation: The vulnerability existed in the transport layer's packet parser, not in application code, demonstrating the importance of monitoring transitive dependencies.

  • A single malformed binary packet could crash the entire Socket.IO server: Unlike traditional DoS attacks requiring high request volumes, this vulnerability could be exploited with minimal bandwidth and a single crafted payload.

  • Dependency overrides in package.json are critical for security: Simply updating package-lock.json isn't enough—the override ensures that all packages in the dependency tree use the patched version, preventing version conflicts.

  • CVE-2026-59725 required both version upgrade and new type definitions: The fix added @types/ws to improve WebSocket handling type safety, showing that security patches often involve more than just bug fixes.

  • Real-time communication libraries require special DoS protection: Applications using Socket.IO, WebSockets, or Server-Sent Events need additional layers of rate limiting and input validation beyond what HTTP services typically require.

How Orbis AppSec Detected This

  • Source: Binary data in HTTP POST requests to Socket.IO endpoints via the engine.io transport layer
  • Sink: Binary packet parser in engine.io version 6.6.5, specifically the handler for malformed binary POST data that lacks proper format validation
  • Missing control: Input validation for binary packet structure, length verification, and error handling for corrupted or malicious binary payloads
  • CWE: CWE-400 (Uncontrolled Resource Consumption)
  • Fix: Upgraded engine.io from 6.6.5 to 6.6.7 with enhanced binary packet validation and added @types/ws dependency for improved type safety

Orbis AppSec automatically detected this vulnerability and opened a pull request with the fix. Try Orbis AppSec on your repositories to find and fix issues like this automatically.

Conclusion

CVE-2026-59725 demonstrates that even mature, widely-used libraries like engine.io can harbor critical vulnerabilities in their input handling logic. The Denial of Service attack vector through malformed binary POST requests was particularly dangerous because it required minimal attacker sophistication while causing maximum disruption to real-time communication services.

The fix—upgrading from engine.io 6.6.5 to 6.6.7 and implementing dependency overrides—provides immediate protection against this attack vector. However, the broader lesson is clear: applications using real-time communication libraries must maintain vigilant dependency management, implement defense-in-depth strategies with rate limiting and input validation, and continuously monitor for security advisories affecting their WebSocket and Socket.IO infrastructure.

For development teams building real-time features, this vulnerability underscores the importance of treating binary data transmission with the same security rigor as traditional HTTP endpoints. Every binary packet, every WebSocket message, and every long-polling request represents a potential attack surface that requires validation, sanitization, and resource limits.

Prevention and further reading

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #23

Related Articles

high

CWE-778: Tribute WebHookHandler Logs No Subscription Events

The Tribute payment webhook handler verified request signatures and then mutated subscription state — granting new subscriptions and cancelling existing ones — while logging nothing on success. Only error paths and a no-op test hook produced log lines, so a forged or replayed `NewSubscription` event that passed signature verification left no record of which `TelegramUserID` was affected. The fix adds structured `slog.Info` records at signature verification and at both state-changing branches.

medium

path-to-regexp 0.1.12 DoS: Catastrophic Backtracking on Malformed URL

path-to-regexp version 0.1.12 contains a regular expression engine vulnerability where maliciously crafted URL parameters trigger exponential backtracking, causing CPU exhaustion and service unavailability. Upgrading to version 0.1.13 eliminates the vulnerable pattern from the parsing logic.

critical

CVE-2026-59873: node-tar 7.5.11 DoS via Crafted Gzip Bomb

node-tar versions 7.5.11 through 7.5.18 are vulnerable to a denial-of-service attack through maliciously crafted gzip archives that decompress to disproportionately large sizes. An attacker can exploit this to exhaust memory and CPU resources by submitting a small, highly compressed archive that expands beyond configured limits during extraction.

high

MapManager.get() Race Condition Duplicates API Requests

The MapManager's `get(mapUid, cache)` method used a check-then-act pattern that permitted multiple concurrent requests to pass the cache miss check simultaneously, triggering redundant API calls and risking cache corruption. The fix introduces a `_pending` promise map to deduplicate in-flight fetches for identical map UIDs.

critical

Lampa Desktop Auto-Update Heuristic Bypass: Execution of Unverified

Lampa Desktop's auto-update mechanism downloaded JavaScript and CSS from `raw.githubusercontent.com` using only heuristic validation—file size thresholds and string pattern matching—that attackers could trivially satisfy. The fix introduces cryptographic integrity verification by cross-referencing Git blob hashes from the GitHub Contents API, ensuring downloaded code matches the repository's authoritative state before execution.

high

adm-zip 0.6.0 Preserves SUID Bits From ZIPs: CVE-2026-102282

The `adm-zip` dependency resolved to 0.6.0 in this project's dependency tree, a version affected by CVE-2026-102282: during extraction it applies the Unix permission bits stored in each ZIP entry's external file attributes verbatim, including the setuid (`04000`), setgid (`02000`), and sticky bits. An attacker who controls an archive passed to `extractAllTo()` or `extractEntryTo()` can therefore have the extractor create a setuid binary owned by whatever user the extraction process runs as. The