CVE-2026-27571: CWE-409: Improper Handling of Highly Compressed Data (Data Amplification) in nats-io nats-server
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 Analysis
Technical Summary
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 consumed by the decompression stream during message construction. An attacker can exploit this by sending a specially crafted compressed message (a compression bomb) that decompresses to a very large size, causing excessive memory allocation. This can overwhelm the server's resources, often triggering the operating system to terminate the nats-server process, resulting in denial of service. Since compression negotiation happens before authentication, attackers do not need valid credentials to exploit this vulnerability. The fix introduced in versions 2.11.12 and 2.12.3 enforces strict bounds on decompression size, causing decompression to fail early if the message exceeds allowed limits, thus preventing memory exhaustion. This vulnerability is tracked as CWE-409 (Improper Handling of Highly Compressed Data) and CWE-770 (Allocation of Resources Without Limits or Throttling). The CVSS v3.1 score is 5.9 (medium), reflecting 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 (DoS) due to resource exhaustion. Organizations running nats-server with WebSocket support exposed to untrusted networks risk server crashes and service interruptions if targeted by compression bomb attacks. This can degrade the availability of critical messaging infrastructure, affecting applications relying on real-time communication, event streaming, or microservices coordination. Since exploitation requires no authentication, attackers can launch attacks from external sources without prior access. The disruption could impact cloud-native platforms, edge computing deployments, and any service architectures dependent on NATS messaging. While confidentiality and integrity are not affected, the availability impact can cause operational downtime, loss of business continuity, and potential cascading failures in dependent systems.
Mitigation Recommendations
Organizations should upgrade affected nats-server deployments to versions 2.11.12 or 2.12.3 or later, where the decompression bounds are properly enforced. If immediate upgrade is not feasible, administrators should consider disabling WebSocket support or restricting WebSocket access to trusted internal networks only, preventing exposure to untrusted endpoints. Network-level protections such as Web Application Firewalls (WAFs) or intrusion prevention systems (IPS) can be configured to detect and block unusually large or suspicious compressed WebSocket frames. Monitoring memory usage and setting resource limits on the nats-server process can help detect and mitigate ongoing attacks. Additionally, implementing rate limiting on incoming WebSocket connections and messages can reduce the risk of resource exhaustion. Regularly auditing and reviewing server exposure and configurations to minimize attack surface is recommended.
Affected Countries
United States, Germany, Japan, South Korea, United Kingdom, Canada, Australia, Netherlands, France, Singapore
CVE-2026-27571: CWE-409: Improper Handling of Highly Compressed Data (Data Amplification) in nats-io 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
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 consumed by the decompression stream during message construction. An attacker can exploit this by sending a specially crafted compressed message (a compression bomb) that decompresses to a very large size, causing excessive memory allocation. This can overwhelm the server's resources, often triggering the operating system to terminate the nats-server process, resulting in denial of service. Since compression negotiation happens before authentication, attackers do not need valid credentials to exploit this vulnerability. The fix introduced in versions 2.11.12 and 2.12.3 enforces strict bounds on decompression size, causing decompression to fail early if the message exceeds allowed limits, thus preventing memory exhaustion. This vulnerability is tracked as CWE-409 (Improper Handling of Highly Compressed Data) and CWE-770 (Allocation of Resources Without Limits or Throttling). The CVSS v3.1 score is 5.9 (medium), reflecting 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 (DoS) due to resource exhaustion. Organizations running nats-server with WebSocket support exposed to untrusted networks risk server crashes and service interruptions if targeted by compression bomb attacks. This can degrade the availability of critical messaging infrastructure, affecting applications relying on real-time communication, event streaming, or microservices coordination. Since exploitation requires no authentication, attackers can launch attacks from external sources without prior access. The disruption could impact cloud-native platforms, edge computing deployments, and any service architectures dependent on NATS messaging. While confidentiality and integrity are not affected, the availability impact can cause operational downtime, loss of business continuity, and potential cascading failures in dependent systems.
Mitigation Recommendations
Organizations should upgrade affected nats-server deployments to versions 2.11.12 or 2.12.3 or later, where the decompression bounds are properly enforced. If immediate upgrade is not feasible, administrators should consider disabling WebSocket support or restricting WebSocket access to trusted internal networks only, preventing exposure to untrusted endpoints. Network-level protections such as Web Application Firewalls (WAFs) or intrusion prevention systems (IPS) can be configured to detect and block unusually large or suspicious compressed WebSocket frames. Monitoring memory usage and setting resource limits on the nats-server process can help detect and mitigate ongoing attacks. Additionally, implementing rate limiting on incoming WebSocket connections and messages can reduce the risk of resource exhaustion. Regularly auditing and reviewing server exposure and configurations to minimize attack surface is recommended.
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: 2/24/2026, 8:55:00 PM
Last updated: 2/24/2026, 10:14:49 PM
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-27593: CWE-640: Weak Password Recovery Mechanism for Forgotten Password in statamic cms
CriticalCVE-2026-27117: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in rikyoz bit7z
MediumCVE-2026-27572: CWE-770: Allocation of Resources Without Limits or Throttling in bytecodealliance wasmtime
MediumCVE-2026-27204: CWE-400: Uncontrolled Resource Consumption in bytecodealliance wasmtime
MediumCVE-2026-27195: CWE-755: Improper Handling of Exceptional Conditions in bytecodealliance wasmtime
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.