CVE-2026-1526: undici is vulnerable to Unbounded Memory Consumption in undici WebSocket permessage-deflate Decompression
## Description The undici WebSocket client is vulnerable to a denial-of-service attack via unbounded memory consumption during permessage-deflate decompression. When a WebSocket connection negotiates the permessage-deflate extension, the client decompresses incoming compressed frames without enforcing any limit on the decompressed data size. A malicious WebSocket server can send a small compressed frame (a "decompression bomb") that expands to an extremely large size in memory, causing the Node.js process to exhaust available memory and crash or become unresponsive. The vulnerability exists in the `PerMessageDeflate.decompress()` method, which accumulates all decompressed chunks in memory and concatenates them into a single Buffer without checking whether the total size exceeds a safe threshold. ## Impact - Remote denial of service against any Node.js application using undici's WebSocket client - A single compressed WebSocket frame of ~6 MB can decompress to ~1 GB or more - Memory exhaustion occurs in native/external memory, bypassing V8 heap limits - No application-level mitigation is possible as decompression occurs before message delivery ### Patches Users should upgrade to fixed versions. ### Workarounds No workaround are possible.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-1526?
CVE-2026-1526 has a critical severity rating due to its potential for causing denial-of-service attacks through unbounded memory consumption.
How do I fix CVE-2026-1526?
To fix CVE-2026-1526, update to the latest version of the undici package that addresses this vulnerability.
What software is affected by CVE-2026-1526?
CVE-2026-1526 affects the undici WebSocket client in JavaScript applications utilizing the npm package.
What type of attack does CVE-2026-1526 allow?
CVE-2026-1526 allows a denial-of-service attack due to unbounded memory consumption during the decompression of WebSocket messages.
What is the impact of CVE-2026-1526 on application performance?
The impact of CVE-2026-1526 can lead to significant degradation of application performance or even complete application crashes.