CVE-2026-58208: NATS Server MQTT-over-WebSocket Path Can Crash WebSocket-Only Vulnerability

MODERATE
Advisory Identifier: GHSA-p957-7v2w-g93g
CVSS 6.8
CWE-248
Published
Advisory Summary

CVE-2026-58208 is a MODERATE (CVSS 6.8) mqtt-over-websocket path can crash websocket-only vulnerability (CWE-248: Uncaught Exception) affecting NATS Server libraries in the Go ecosystem. The issue involves mqtt-over-websocket path can crash websocket-only jetstream servers before mqtt is enabled. Remediation is available by upgrading affected packages to version 2.12.12, 2.14.3.

CVE-2026-58208 at a Glance

CVE Identifier CVE-2026-58208
GHSA Identifier GHSA-p957-7v2w-g93g
Severity MODERATE
CVSS v3.1 Base Score 6.8
CWE Classification CWE-248: Uncaught Exception
Affected Product NATS Server
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-58208

To remediate this vulnerability, upgrade all affected NATS Server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/nats-io/nats-server/v2 fixed: 2.12.12
Upgrade github.com/nats-io/nats-server/v2 to 2.12.12
github.com/nats-io/nats-server/v2 fixed: 2.14.3
Upgrade github.com/nats-io/nats-server/v2 to 2.14.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/nats-io/nats-server/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-58208, inspect your project dependencies for NATS Server:

inspect dependencies for github.com/nats-io/nats-server/v2

Analyze the terminal output to locate any version of NATS Server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.12.12), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In NATS Server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 * GHSA advisory: <https://github.com/nats-io/nats-server/security/advisories/GHSA-p957-7v2w-g93g> * Credit: Vasco Franco, Trail of Bits

CVE-2026-58208 Affected NATS Server Versions

2 component(s)
Fixed Versions:
2.12.122.14.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/nats-io/nats-server/v2
Go
< 2.12.12
2.12.12
github.com/nats-io/nats-server/v2
Go
≥ 2.14.0-RC.1
< 2.14.3
2.14.3

References

Frequently Asked Questions

What is CVE-2026-58208?
CVE-2026-58208 is a security vulnerability in NATS Server involving MQTT-over-WebSocket Path Can Crash WebSocket-Only JetStream Servers Before MQTT Is Enabled under CWE-248: Uncaught Exception.
Which NATS Server versions are affected?
Affected versions include releases prior to 2.12.12, 2.14.3 across affected packages: github.com/nats-io/nats-server/v2.
What version fixes CVE-2026-58208?
Upgrading to 2.12.12, 2.14.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/nats-io/nats-server/v2 affected?
Yes, github.com/nats-io/nats-server/v2 is affected in releases prior to 2.12.12, 2.14.3. Upgrade your dependency to 2.12.12, 2.14.3 or later.
What is the CVSS score of CVE-2026-58208?
CVE-2026-58208 has a CVSS v3.1 base score of 6.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H.
What CWE is associated with CVE-2026-58208?
CVE-2026-58208 is classified under CWE-248: Uncaught Exception (An exception is thrown from a function, but it is not caught.).
How can I check Go dependencies for CVE-2026-58208?
Run the dependency tree command: 'inspect dependencies for github.com/nats-io/nats-server/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p957-7v2w-g93g",
  "modified" : "2026-11-20T00:05:17Z",
  "published" : "2026-11-20T00:05:17Z",
  "aliases" : [ "CVE-2026-58208" ],
  "summary" : "NATS Server: MQTT-over-WebSocket Path Can Crash WebSocket-Only JetStream Servers Before MQTT Is Enabled",
  "details" : "### Background\n\nNATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT and edge computing.\n\nThe NATS Server can accept client connections over WebSocket and can also support MQTT over WebSocket when MQTT is configured.\n\n### Problem Description\n\nA WebSocket listener could route requests for the MQTT-over-WebSocket path into MQTT handling even when MQTT was not configured.\n\nOn affected deployments, an unauthenticated client with access to the WebSocket listener could reach uninitialized MQTT state and crash the server process.\n\nThis 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.\n\n### Affected Versions\n\nVersions v2.14.2, v2.12.11 and below are vulnerable. The issue is fixed in v2.14.3 and v2.12.12.\n\n### Workarounds\n\nDeployments 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.\n\n### References\n\n * GHSA advisory: <https://github.com/nats-io/nats-server/security/advisories/GHSA-p957-7v2w-g93g>\n * Credit: Vasco Franco, Trail of Bits",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/nats-io/nats-server/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.12.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/nats-io/nats-server/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.14.0-RC.1"
      }, {
        "fixed" : "2.14.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/security/advisories/GHSA-p957-7v2w-g93g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-58208"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/commit/73b3dd9a5ea0fa7bf08b702338676355b29b5fb4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/commit/837536b98b3a9280b993282155ff2bdd3ca38c30"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nats-io/nats-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/releases/tag/v2.12.12"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/releases/tag/v2.14.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-248" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-20T00:05:17Z",
    "nvd_published_at" : "2026-07-08T21:16:52Z"
  }
}