NestJS microservices unbounded memory growth in TCP transport

Severity: medium · CVSS 6.5 · Published 2026-09-30

NestJS microservices using the built-in TCP transport can be forced to allocate unbounded memory by any peer with network access to the service port. An attacker can open TCP connections and send partial messages or stall message reading, causing the process to consume memory until it crashes. This affects availability and can repeatedly restart services in containerized environments.

Vendors: NestJS.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Medium severity, with a CVSS score of 6.5, published 30 September 2026.
Which products and versions are affected?
NestJS @Nestjs/Microservices < 11.2.5, >= 12.0.0 and < 12.0.3.
Is there a fix for This vulnerability?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run NestJS @Nestjs/Microservices at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

Two memory exhaustion vulnerabilities exist in the TCP microservice transport: (1) partial packet buffering with no timeout or connection limits allows attackers to hold arbitrary amounts of heap memory indefinitely, and (2) ignored socket write backpressure causes the server to queue all response data in memory when a client stops reading. An unauthenticated network peer can trigger both paths without valid messages. The vulnerability is fixed by adding incomplete message timeouts, respecting socket backpressure, and capping response send buffers.

Affected products

  • NestJS @nestjs/microservices < 11.2.5, >= 12.0.0 and < 12.0.3

Timeline

  • 2026-09-30: disclosed

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.