CVE-2026-27571: nats-server websockets are vulnerable to pre-auth memory DoS

Published Feb 24, 2026
·
Updated

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).

Other sources

NATS-Server is a High-Performance server for NATS.io, a cloud and edge native messaging system. The WebSockets handling of NATS messages handles compressed messages via the WebSockets negotiated compression. Prior to versions 2.11.2 and 2.12.3, 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, present in versions 2.11.2 and 2.12.3, was to bounds the decompression to fail once the message was too large, instead of continuing on. The vulnerability only affects deployments which use WebSockets and which expose the network port to untrusted end-points.

NVD

nats-server websockets are vulnerable to pre-auth memory DoS

Microsoft

Affected Software

7 affected componentsFixes available
go/github.com/nats-io/nats-server<=1.4.1
go/github.com/nats-io/nats-server/v2>=2.12.0-RC.1<2.12.3
2.12.3
go/github.com/nats-io/nats-server/v2<2.11.12
2.11.12
linuxfoundation Nats-server<2.11.12
linuxfoundation Nats-server>=2.12.0<2.12.3
Microsoft azl3 telegraf 1.31.0-12
Microsoft cbl2 telegraf 1.29.4-18

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/nats-io/nats-server/v2 to a version that resolves this vulnerability.

    Fixed in 2.12.3
  2. Upgrade

    Upgrade go/github.com/nats-io/nats-server/v2 to a version that resolves this vulnerability.

    Fixed in 2.11.12
  3. Upgrade

    Upgrade nats-server to a version that resolves this vulnerability.

    Fixed in 2.11.12
  4. Upgrade

    Upgrade nats-server to a version that resolves this vulnerability.

    Fixed in 2.12.3
  5. Compensating control

    For NATS-Server deployments using WebSockets, do not expose the NATS network port (where WebSockets are accepted) to untrusted endpoints.

Event History

Feb 24, 2026
CVE Published
via MITRE·03:59 PM
Data Sourced
via MITRE·03:59 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·04:04 PM
Data Sourced
via GitHub·04:04 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via NVD·05:29 PM
RemedyDescriptionSeverityWeaknessAffected Software
Feb 27, 2026
Data Sourced
via Microsoft·09:01 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·09:01 AM
Affected Software
Updated
via Microsoft·09:01 AM
DescriptionSeverity
Jan 4, 58137
Event
via FIRST·03:29 PM

Frequently Asked Questions

1

What is the severity of CVE-2026-27571?

CVE-2026-27571 has a medium severity rating due to the potential for memory resource exhaustion in specific scenarios.

2

How do I fix CVE-2026-27571?

To fix CVE-2026-27571, upgrade to NATS Server version 2.12.3 or later, or 2.11.12 if using an earlier version.

3

What components are impacted by CVE-2026-27571?

CVE-2026-27571 affects versions of the NATS Server prior to 1.4.1 and certain versions within the 2.x range.

4

Is CVE-2026-27571 a local or remote vulnerability?

CVE-2026-27571 can be exploited remotely if an attacker successfully sends specially crafted compressed messages.

5

What operating systems are affected by CVE-2026-27571?

CVE-2026-27571 affects any operating system running the vulnerable versions of the NATS Server.

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