Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-27571: CWE-409: Improper Handling of Highly Compressed Data (Data Amplification) in nats-io nats-server

0
Medium
VulnerabilityCVE-2026-27571cvecve-2026-27571cwe-409cwe-770
Published: Tue Feb 24 2026 (02/24/2026, 15:59:17 UTC)
Source: CVE Database V5
Vendor/Project: nats-io
Product: nats-server

Description

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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/04/2026, 19:03:24 UTC

Technical Analysis

NATS-Server is a high-performance messaging server used in cloud and edge native environments. It supports WebSocket connections where message compression is negotiated before authentication. In affected versions prior to 2.11.12 and between 2.12.0-RC.1 and 2.12.3, the server bounded the memory size of a NATS message but failed to independently limit the memory consumption of the decompression stream when constructing the message. This improper handling of highly compressed data (CWE-409) allows an attacker to craft a compression bomb—a small compressed payload that expands to a very large size upon decompression. When such a payload is sent over WebSockets, the server attempts to decompress it without sufficient bounds, leading to excessive memory allocation. This can exhaust system resources and cause the operating system to terminate the nats-server process, resulting in denial of service (CWE-770). Since compression negotiation happens before authentication, an unauthenticated attacker can exploit this vulnerability if the WebSocket port is exposed to untrusted networks. The fix implemented in versions 2.11.12 and 2.12.3 adds strict bounds on decompression size, causing decompression to fail early if the message exceeds acceptable limits, preventing resource exhaustion. This vulnerability does not affect non-WebSocket deployments or those not exposing the WebSocket port externally. No public exploits have been observed, but the vulnerability has a CVSS v3.1 score of 5.9, reflecting medium severity with network attack vector, high attack complexity, no privileges required, no user interaction, and impact limited to availability.

Potential Impact

The primary impact of this vulnerability is denial of service through resource exhaustion. An attacker can cause the nats-server process to consume excessive memory by sending a crafted compression bomb over WebSockets, leading to process termination by the operating system. This disrupts messaging services relying on nats-server, potentially affecting critical cloud-native and edge-native applications that depend on reliable message delivery. The availability impact can cascade to dependent systems and services, causing outages or degraded performance. Since exploitation does not require authentication, any exposed WebSocket endpoint is at risk from remote attackers. However, confidentiality and integrity are not impacted by this vulnerability. Organizations running nats-server with WebSocket support exposed to untrusted networks face increased risk of denial of service attacks, which could be leveraged as part of larger multi-vector attacks or to cause operational disruptions.

Mitigation Recommendations

Organizations should upgrade affected nats-server deployments to version 2.11.12 or 2.12.3 or later, where the decompression bounds fix is implemented. If immediate upgrade is not possible, mitigate risk by restricting access to the WebSocket port using network-level controls such as firewalls or VPNs to limit exposure to trusted clients only. Disable WebSocket support if it is not required. Implement monitoring and alerting on memory usage and process restarts of nats-server to detect potential exploitation attempts early. Consider deploying rate limiting or Web Application Firewall (WAF) rules to detect and block suspiciously large or compressed WebSocket messages. Review and harden authentication and network segmentation to reduce attack surface. Regularly audit and update dependencies to incorporate security patches promptly.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-02-20T17:40:28.448Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 699e0f3cbe58cf853b290ce8

Added to database: 2/24/2026, 8:51:08 PM

Last enriched: 3/4/2026, 7:03:24 PM

Last updated: 4/10/2026, 9:32:01 PM

Views: 199

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses