CVE-2026-140011: permessage-deflate-ruby: Memory exhaustion triggered by message decompression
permessage-deflate-ruby provides the per-message DEFLATE compression extension for WebSocket connections. Prior to permessagedeflate 0.2.0, websocket-extensions 0.2.0, and websocket-driver 0.9.0, an unauthenticated remote WebSocket client can send a highly compressible message that expands to a much larger size because websocket-driver's :maxlength option is checked only after permessage-deflate fully inflates the message. The extension can therefore allocate memory far beyond the wire size and configured message limit, causing memory exhaustion; the coordinated fix enforces :maxlength while consuming zlib output and forwards the option through websocket-extensions and websocket-driver. This issue is fixed in permessagedeflate 0.2.0, websocket-extensions 0.2.0, and websocket-driver 0.9.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
permessage_deflateto a version that resolves this vulnerability.Fixed in 0.2.0 - Upgrade
Upgrade
websocket-extensionsto a version that resolves this vulnerability.Fixed in 0.2.0 - Upgrade
Upgrade
websocket-driverto a version that resolves this vulnerability.Fixed in 0.9.0
Event History
Frequently Asked Questions
Who can exploit this issue?
An unauthenticated remote WebSocket client can exploit it by sending a highly compressible message to an affected service. No user interaction or prior privileges are required.
Are configured WebSocket message-size limits sufficient to prevent exploitation?
No. In affected versions, websocket-driver checks the :max_length limit only after permessage-deflate has fully decompressed the message, so memory allocation can exceed both the wire size and configured limit.
What versions contain the fix?
The coordinated fix is available in permessage_deflate 0.2.0, websocket-extensions 0.2.0, and websocket-driver 0.9.0. The fix enforces :max_length while zlib output is consumed and forwards the option through the related components.