CVE-2026-58208: NATS Server WebSocket Denial-of-Service Vulnerability
NATS Server, a popular messaging platform used in cloud and edge deployments, contains a flaw in its WebSocket listener that can be exploited by an unauthenticated attacker to crash the server. The vulnerability arises because the WebSocket component attempts to route MQTT-over-WebSocket traffic to MQTT handling logic even when MQTT is not actually configured or initialized on that server instance. An attacker with network access to the WebSocket listener can send specially crafted requests that trigger this uninitialized state, causing the server process to crash and disrupting messaging services. The issue affects versions prior to 2.14.3 and 2.12.12.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.8 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-248
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-08 / 2026-07-09
NVD description (verbatim)
NATS Server is a high-performance server for NATS.io, the cloud and edge native messaging system. Prior to 2.14.3 and 2.12.12, a WebSocket listener could route requests for the MQTT-over-WebSocket path into MQTT handling even when MQTT was not configured, allowing an unauthenticated client with access to the WebSocket listener to reach uninitialized MQTT state and crash the server process. This issue is fixed in versions 2.14.3 and 2.12.12.
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in the NATS Server WebSocket listener's request routing logic. When a WebSocket connection arrives with an MQTT-over-WebSocket path pattern, the listener forwards the request to MQTT handling code paths without first verifying whether MQTT has been configured and initialized on the server. If MQTT is disabled or unconfigured, the handler attempts to access uninitialized state, triggering a crash. The root cause is improper input validation and state verification before dispatching to protocol-specific handlers. CWE-248 (Uncaught Exception) applies because the crash stems from accessing uninitialized resources without proper exception handling or pre-flight checks.
Business impact
For organizations relying on NATS Server as a critical messaging backbone in cloud-native or edge environments, this vulnerability creates a denial-of-service risk. An unauthenticated attacker can remotely crash the server without authentication, disrupting all connected services and causing message delivery failures. In production environments where NATS coordinates microservices, IoT gateways, or event streaming, unexpected downtime can cascade across dependent systems. Recovery requires manual server restart and may trigger cascading failures in dependent applications.
Affected systems
NATS Server versions prior to 2.14.3 and prior to 2.12.12 are affected. The vulnerability is exposed only when a WebSocket listener is configured and accessible to untrusted networks. Servers with MQTT explicitly disabled but WebSocket enabled remain vulnerable. Systems that have already upgraded to 2.14.3 or 2.12.12 are not affected.
Exploitability
Exploitation is relatively straightforward: an attacker with network access to the WebSocket listener can send an MQTT-over-WebSocket request without authentication to trigger the crash. The CVSS score of 6.8 (Medium) reflects the network accessibility (AV:N), the requirement for specific conditions such as an exposed WebSocket listener and MQTT being disabled (AC:H), and the impact limited to availability (A:H). No authentication is required (PR:N), but the attack requires knowledge of the deployment configuration and network reachability to the listener port.
Remediation
Organizations should upgrade to NATS Server 2.14.3 or 2.12.12 as soon as possible. Consult the official NATS release notes and vendor advisory to verify the exact version applicable to your deployment branch. As a temporary mitigation prior to patching, restrict network access to the WebSocket listener using firewall rules or network segmentation, ensuring only trusted clients can reach the listener port. Consider disabling the WebSocket listener entirely if it is not required for your use case.
Patch guidance
Upgrade NATS Server to version 2.14.3 (for the 2.14.x branch) or 2.12.12 (for the 2.12.x branch) or later. Verify with the official Linux Foundation NATS project release notes that your deployment branch is covered by these fixed versions. If you are running a version older than 2.12.x, consult the vendor advisory to determine if a backport or extended support is available. After patching, perform a controlled restart of the server to activate the fix, and verify connectivity from dependent services.
Detection guidance
Monitor NATS Server logs for unexpected crashes or restarts that coincide with WebSocket connection attempts. Implement network monitoring to detect unusual WebSocket traffic patterns targeting MQTT paths on NATS listener ports. A sudden spike in WebSocket connections followed by server restart may indicate an exploitation attempt. Additionally, review server configuration to identify instances where WebSocket is enabled but MQTT is disabled—these are the most vulnerable configurations. Enable verbose logging on the WebSocket listener if available to capture request patterns before crashes.
Why prioritize this
This vulnerability warrants prompt but not emergency patching. While it requires network access and the target is an unauthenticated attacker, the denial-of-service impact on a critical messaging component makes it operationally significant. Organizations should prioritize this vulnerability in the context of their NATS deployment's criticality to their architecture. If NATS is a dependency for time-sensitive or mission-critical services (e.g., IoT command/control, real-time event processing), elevation of priority is justified. For test or non-critical deployments, standard patching cycles are acceptable.
Risk score, explained
The CVSS 6.8 (Medium) score reflects a networked, unauthenticated attack vector with the ability to completely deny service to the NATS Server component. The score is moderated by the requirement for a specific configuration (WebSocket enabled, MQTT disabled or unconfigured) and reachability to the listener, which may not be exposed on all deployments. The impact is strictly availability—no confidentiality or integrity loss occurs. Organizations with exposed NATS WebSocket listeners in untrusted networks should treat this as higher priority; those with network segmentation or limited exposure can follow standard patching cycles.
Frequently asked questions
Does this vulnerability allow attackers to steal data or modify messages?
No. The vulnerability results in a denial-of-service crash only. There is no data exfiltration, message tampering, or authentication bypass. Confidentiality and integrity are not compromised.
Does this affect NATS deployments that do not use WebSocket or have MQTT enabled?
No. The vulnerability requires a WebSocket listener to be active and MQTT to be either unconfigured or disabled. If MQTT is properly initialized and in use, or if you do not expose a WebSocket listener, this vulnerability does not apply to your deployment.
Can this be exploited without network access to the NATS server?
No. An attacker must have network connectivity to the WebSocket listener port. Deployments that restrict access via firewall rules or run NATS in an isolated network are naturally protected until patching becomes convenient.
What should I do if I cannot patch immediately?
Implement firewall or network access controls to restrict inbound connections to the NATS listener to only trusted clients and networks. Disable the WebSocket listener if it is not actively used. Monitor server logs and metrics for unexpected crashes. Develop a patch timeline aligned with your change management process, prioritizing based on the criticality of NATS to your services.
This analysis is based on published vulnerability data and vendor statements current as of the publication date. Patch version numbers and affected software branches should be verified against the official Linux Foundation NATS project advisories before implementation. This vulnerability assessment does not constitute legal advice or guarantee of remediation success. Organizations should conduct their own risk assessment and testing before deploying patches in production environments. No exploit code or weaponized proof-of-concept is provided with this analysis. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-12644MEDIUMts-deepmerge Denial of Service via Prototype Method Injection
- CVE-2026-14631MEDIUMwebpack-dev-server Denial of Service via Malformed Headers
- CVE-2026-45554MEDIUMNiceGUI Static Asset Route Log Flooding Vulnerability
- CVE-2026-45676MEDIUMOpenTelemetry eBPF Instrumentation ELF Parser Denial of Service
- CVE-2026-46411MEDIUMFlashMQ Authentication DoS via Write Buffer Overflow
- CVE-2026-54775MEDIUMCoreWCF Kafka Denial of Service via Tombstone Records
- CVE-2026-55517MEDIUMDeno WebSocket Client Denial-of-Service Vulnerability
- CVE-2026-59875MEDIUMnode-tar NUL Byte Denial of Service in PAX Headers