ADVISORIES

GitHub Advisory Database

GHSA-hpwf-8g29-85qm

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

Details

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/[email protected]

References

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

Affected packages

EcosystemPackageAffected versions
npm@nestjs/microservices
All versions before 11.1.19 (fixed in 11.1.19)

References