GitHub Advisoryadvisory · npm
GHSA-vrm6-8vpv-qv8q Undici has Unbounded Memory Consumption in WebSocket permessage-deflate Decompression
HIGH
Official page ↗
- Aliases
- CVE-2026-1526
- Ecosystem
- npm
- Packages
- undici
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses
- CWE-409
- Reviewed
- 2026-03-13
Affected packages
• npm undici: < 6.24.0 → fixed in 6.24.0
• npm undici: >= 7.0.0, < 7.24.0 → fixed in 7.24.0
Description
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.
Related
Alias · CVE (1)
- CVE-2026-1526 The undici WebSocket client is vulnerable to a denial-of-service attack via unbounded memory consumption during permessage-deflate… vulnerability
Weakness · CWE (1)
- CWE-409 Improper Handling of Highly Compressed Data (Data Amplification) weakness
References
- https://github.com/nodejs/undici/security/advisories/GHSA-vrm6-8vpv-qv8q web
- https://nvd.nist.gov/vuln/detail/CVE-2026-1526 advisory
- https://hackerone.com/reports/3481206 web
- https://cna.openjsf.org/security-advisories.html web
- https://datatracker.ietf.org/doc/html/rfc7692 web
- https://github.com/nodejs/undici package
- https://owasp.org/www-community/attacks/Denial_of_Service web