All reports
High

Nest Affected by DoS via Recursive handleData in JsonSocket (TCP Transport)

Affected versions

Affected versions
<= 11.1.18
Fixed version
11.1.19

Exploitation

CVE-2026-40879

Probability of exploitation in the next 30 days: 0.34%

FIRST EPSS · 2026-11-22

Description

Impact

Attacker sends many small, valid JSON messages in one TCP frame → handleData() recurses once per message; buffer shrinks each call → maxBufferSize is never reached; call stack overflows instead → A ~47 KB payload is sufficient to trigger RangeError

Patches

Fixed in @nestjs/microservices@11.1.19

References

Discovered by https://github.com/hwpark6804-gif

Links

Credits

  • hwpark6804-gif
  • kamilmysliwiec