undici WebSocket client vulnerable to denial of service via fragment count bypass
undici
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| undici npm |
|
|
Original description
Impact: The undici WebSocket client enforces maxPayloadSize on the cumulative byte count of fragments in a message but does not enforce a limit on the number of fragments. A malicious WebSocket server can stream many small or empty continuation frames that each pass per-frame and cumulative-size validation, collectively causing unbounded memory growth in the client process. The result is memory exhaustion and a denial of service.