Skip to content

MQTT-over-WebSocket Path Can Crash WebSocket-Only JetStream Servers Before MQTT Is Enabled

Moderate
neilalexander published GHSA-p957-7v2w-g93g Jun 29, 2026

Package

gomod github.com/nats-io/nats-server/v2 (Go)

Affected versions

<= 2.14.2, <= 2.12.11

Patched versions

2.14.3, 2.12.12

Description

Background

NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT and edge computing.

The NATS Server can accept client connections over WebSocket and can also support MQTT over WebSocket when MQTT is configured.

Problem Description

A WebSocket listener could route requests for the MQTT-over-WebSocket path into MQTT handling even when MQTT was not configured.

On affected deployments, an unauthenticated client with access to the WebSocket listener could reach uninitialized MQTT state and crash the server process.

This affects deployments that enable WebSocket while leaving MQTT disabled. Deployments where MQTT is intentionally configured initialize the MQTT state and are not affected in the same way.

Affected Versions

Versions v2.14.2, v2.12.11 and below are vulnerable. The issue is fixed in v2.14.3 and v2.12.12.

Workarounds

Deployments not using WebSocket are not affected. Deployments using both WebSockets and MQTT are not affected. No known workaround for deployments that need WebSocket without MQTT-over-WebSocket. Upgrade to a fixed release.

References

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H

CVE ID

CVE-2026-58208

Weaknesses

Uncaught Exception

An exception is thrown from a function, but it is not caught. Learn more on MITRE.