CVE-2026-27571: nats-server websockets are vulnerable to pre-auth memory DoS
(updated )
The WebSockets handling of NATS messages handles compressed messages via the WebSockets negotiated compression. The implementation bound the memory size of a NATS message but did not independently bound the memory consumption of the memory stream when constructing a NATS message which might then fail validation for size reasons.
An attacker can use a compression bomb to cause excessive memory consumption, often resulting in the operating system terminating the server process.
The use of compression is negotiated before authentication, so this does not require valid NATS credentials to exploit.
The fix was to bounds the decompression to fail once the message was too large, instead of continuing on.
References
- github.com/advisories/GHSA-qrvq-68c2-7grw
- github.com/nats-io/nats-server
- github.com/nats-io/nats-server/commit/f77fb7c4535e6727cc1a2899cd8e6bbdd8ba2017
- github.com/nats-io/nats-server/releases/tag/v2.11.12
- github.com/nats-io/nats-server/releases/tag/v2.12.3
- github.com/nats-io/nats-server/security/advisories/GHSA-qrvq-68c2-7grw
- nvd.nist.gov/vuln/detail/CVE-2026-27571
- pkg.go.dev/vuln/GO-2026-4533
Code Behaviors & Features
Detect and mitigate CVE-2026-27571 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →