websocket-driver: draft75/76 parser crash/corruption plus memory-exhaustion DoS flaws in npm & Ruby packages (CVE-2026-140004/140016/140001/140002/140015)
Severity: critical · Patch status: patched · Since 2026-12-01 · CVE-2026-140001, CVE-2026-140002, CVE-2026-140004, CVE-2026-140015, CVE-2026-140016
Multiple critical and high advisories disclose flaws in the websocket-driver libraries for Node.js and Ruby. A draft75/76 parsing bug (npm CVE-2026-140004 fixed in 0.8.0; Ruby CVE-2026-140016 fixed in 0.9.0) lets an unauthenticated client send a short byte sequence that causes duplicated messages or an uncaught-exception crash; draft support is now disabled by default with allowDrafts/allowdrafts opt-in. Additional memory-exhaustion DoS flaws (CVE-2026-140001, CVE-2026-140002, CVE-2026-140015, CVSS 7.5) let a single unauthenticated connection exhaust server memory via zero-length fragmented frames or data buffered after a close frame on a half-open socket; fixed in npm 0.8.1 and RubyGems 0.9.1. Public PoCs exist for all; no in-the-wild exploitation reported. Any server using websocket-driver directly or via dependents like faye should upgrade immediately.
What to do
- Upgrade npm websocket-driver to >= 0.8.1 and RubyGems websocket-driver to >= 0.9.1, including via transitive dependents (e.g. faye)
- If draft75/draft76 support is not required (rarely it is), rely on the new default that rejects draft connections as bad requests
- If legacy draft support is genuinely needed, set allowDrafts: true (Node) / allow_drafts: true (Ruby) only after upgrading to the patched parser
- Audit internet-facing WebSocket services for memory-exhaustion, crash/restart patterns that may indicate attempted exploitation
- Add or verify exception handling around WebSocket message parsing so a parser error cannot take down the process; consider connection limits and memory monitoring
Fixed versions
- websocket-driver (npm) 0.8.1
- websocket-driver (rubygems) 0.9.1
Sources
All live incidents on Threat Watch