You've probably seen a server suddenly crash with an out-of-memory error even though traffic looked completely normal. It's a classic scenario: a couple of clients on shaky connections subscribe to Server-Sent Events (SSE) or WebSockets, and the socket buffers quietly bloat with backed-up data.
In the NestJS v12.2.0 update released on October 19, 2026, Kamil Mysliwiec's team plugged those leaks with built-in limits. The @Sse() decorator now has a maxPendingDataLength threshold of 4,000,000 characters: if a slow client stops draining the stream, the connection is dropped immediately to protect the Node.js heap. For WebSocket adapters, they introduced a parallel queue limit of 1,000 messages.
Data handling got a cleanup too. ValidationPipe now caps error message length at 1,000,000 characters, and validationError.target defaults to false so request bodies don't leak into your logs when validation fails.
For microservices, the release adds a 30-second drainTimeout for waiting on TCP clients and a 16 MiB message limit for Kafka. One more nice touch: multipart files rejected by validation are now automatically deleted from disk so they don't pile up in storage.