This vulnerability in undici's WebSocket permessage-deflate implementation will crash a Node.js process with just 130 KB of compressed data — no authentication, no special positioning, no application-level mistake required. The root cause is deceptively simple: when the decompressed payload exceeds the 128 MiB limit, the code removes the error listener from the inflate stream to prevent memory growth. But the zlib layer still has internal state that can emit errors after that point. With the listener removed, Node.js terminates the process instead of handling the error gracefully. The connection drops cleanly if you simply let the zlib limit throw — the listener removal converts a recoverable error into a fatal one.
The fix is straightforward: re-add the error listener before the cleanup code executes, or remove the cleanup entirely since the zlib limit already handles the boundary condition. Check your undici version — this code existed across the 6.x, 7.x, and 8.x branches, meaning the window of exposure spans multiple major releases.
What makes this worth careful attention is the asymmetry. The original developer likely added the listener removal to prevent memory bloat from inflated payloads, a legitimate concern in high-throughput WebSocket scenarios. But the cure is worse than the disease: a 130 KB payload now terminates the entire Node.js process, not just the WebSocket connection. In any service running undici's WebSocket client alongside other handlers, that single crash takes down every other subsystem in the same address space. This isn't a sandboxed failure — it's a denial-of-service vector against your own infrastructure.
The CVSS 5.9 score understates the operational severity because it treats process termination as a medium availability impact rather than accounting for the collateral damage of crashing a long-running service. For production systems, treat this as high severity regardless of the official vector. Patch immediately, and consider running WebSocket clients in isolated processes as defense-in-depth against similar future issues in the zlib stream lifecycle.