Monitor vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
5.9
NATS-server WebSockets Can Crash from Malicious Data
CVE-2026-27571
GHSA-qrvq-68c2-7grw
Summary
An attacker can send specially crafted compressed data to a NATS-server using WebSockets, causing the server to run out of memory and crash. This can happen even if the attacker doesn't have valid login credentials. If you're using NATS-server with WebSockets and expose it to untrusted networks, update to the latest version to prevent this issue.
What to do
- Update github.com nats-io to version 2.11.12.
- Update github.com nats-io to version 2.12.3.
Affected software
| Vendor | Product | Affected versions | Fix available |
|---|---|---|---|
| github.com | nats-io | <= 2.11.12 | 2.11.12 |
| github.com | nats-io | > 2.12.0-RC.1 , <= 2.12.3 | 2.12.3 |
| github.com | nats-io | <= 1.4.1 | – |
| linuxfoundation | nats-server | <= 2.11.12 | – |
| linuxfoundation | nats-server | > 2.12.0 , <= 2.12.3 | – |
Original title
nats-server websockets are vulnerable to pre-auth memory DoS
Original description
### Impact
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.
### Patches
This was released in nats-server without being highlighted as a security issue. It should have been, this was an oversight. Per the NATS security policy, because this does not require a valid user, it is CVE-worthy.
This was fixed in the v2.11 series with v2.11.12 and in the v2.12 series with v2.12.3.
### Workarounds
This only affects deployments which use WebSockets and which expose the network port to untrusted end-points.
### References
This was reported to the NATS maintainers by Pavel Kohout of Aisle Research (www.aisle.com).
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.
### Patches
This was released in nats-server without being highlighted as a security issue. It should have been, this was an oversight. Per the NATS security policy, because this does not require a valid user, it is CVE-worthy.
This was fixed in the v2.11 series with v2.11.12 and in the v2.12 series with v2.12.3.
### Workarounds
This only affects deployments which use WebSockets and which expose the network port to untrusted end-points.
### References
This was reported to the NATS maintainers by Pavel Kohout of Aisle Research (www.aisle.com).
nvd CVSS3.1
7.5
Vulnerability type
CWE-409
CWE-770
Allocation of Resources Without Limits
- https://nvd.nist.gov/vuln/detail/CVE-2026-27571
- https://pkg.go.dev/vuln/GO-2026-4533
- https://github.com/advisories/GHSA-qrvq-68c2-7grw
- https://github.com/nats-io/nats-server/commit/f77fb7c4535e6727cc1a2899cd8e6bbdd8... Patch
- https://github.com/nats-io/nats-server/releases/tag/v2.11.12 Product Release Notes
- https://github.com/nats-io/nats-server/releases/tag/v2.12.3 Product Release Notes
- https://github.com/nats-io/nats-server/security/advisories/GHSA-qrvq-68c2-7grw Vendor Advisory
Published: 24 Feb 2026 · Updated: 12 Mar 2026 · First seen: 6 Mar 2026