CVE-2026-40879: Nest: DoS via Recursive handleData in JsonSocket (TCP Transport)

Published Apr 14, 2026
·
Updated

### 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

Affected Software

2 affected componentsFixes available
npm/@nestjs/microservices<=11.1.18
11.1.19
nestjs Nest Node.js<11.1.19

Event History

Apr 14, 2026
Advisory Published
via GitHub·12:15 AM
Data Sourced
via GitHub·12:15 AM
DescriptionSeverityWeaknessAffected Software
Apr 21, 2026
CVE Published
via MITRE·07:14 PM
Data Sourced
via MITRE·07:14 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-40879?

CVE-2026-40879 has a severity that can lead to a denial of service (DoS) condition due to stack overflow issues.

2

How do I fix CVE-2026-40879?

To fix CVE-2026-40879, upgrade to version 11.1.19 or later of the @nestjs/microservices package.

3

What software is affected by CVE-2026-40879?

CVE-2026-40879 affects versions of @nestjs/microservices up to and including 11.1.18 and all versions of the Nest framework prior to 11.1.19.

4

What causes the vulnerability in CVE-2026-40879?

The vulnerability in CVE-2026-40879 is caused by handling many small valid JSON messages in one TCP frame, leading to recursive function calls.

5

What are the implications of CVE-2026-40879 for application security?

The implications of CVE-2026-40879 include potential service unavailability due to denial of service attacks targeting the application.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203