Vulnerabilities in pkg:golang/github.com/nats-io/nats-server/v2

PACKAGE
Advisory Identifier: GHSA-3g5q-cfh2-cq67
Advisory Summary

CVE-2026-58250 is a HIGH (CVSS 8.6) denial of service vulnerability (CWE-476: NULL Pointer Dereference) affecting NATS Server libraries in the Go ecosystem. The issue involves denial of service via repeated pre-authentication leafnode info messages. Remediation is available by upgrading affected packages to version 2.11.17, 2.12.8.

36 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/nats-io/nats-server/v2

36 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/nats-io/nats-server/v2. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-3g5q-cfh2-cq67 CVE-2026-58250 HIGH NATS Server: Denial of service via repeated pre-authentication leafnode INFO messages
GHSA-p3j5-5hrq-p75h CVE-2026-58254 MODERATE nats-server Leaf node connections bypass Nats-Trace-Dest permission check
GHSA-p957-7v2w-g93g CVE-2026-58208 MODERATE NATS Server: MQTT-over-WebSocket Path Can Crash WebSocket-Only JetStream Servers Before MQTT Is Enabled
GHSA-r72h-j7qq-v6qg CVE-2026-58210 HIGH NATS Server allows unauthenticated memory exhaustion through incomplete MQTT CONNECT packets
GHSA-7qmq-8cc4-hxwg CVE-2026-58209 MODERATE NATS Server MQTT retained messages and QoS replay bypass subscription deny rules
GHSA-4g68-3pwx-5vfj CVE-2026-58214 MODERATE NATS Server MQTT subscribe permission bypass exposes internal QoS 2 metadata
GHSA-qrcv-3558-gj4f CVE-2026-58213 HIGH NATS Server: MQTT SUBSCRIBE Protocol Injection via Leaf Node/Route Forwarding allows arbitrary NATS command injection
GHSA-fhg8-qxh5-7q3w CVE-2025-30215 CRITICAL NATS Server may fail to authorize certain Jetstream admin APIs
GHSA-m4jx-6526-vvhm CVE-2020-28466 HIGH Denial of service in github.com/nats-io/nats-server/server
GHSA-3f24-pcvm-5jqc CVE-2026-33248 MODERATE NATS has mTLS verify_and_map authentication bypass via incorrect Subject DN matching
GHSA-pwx7-fx9r-hr4h CVE-2026-33223 MODERATE NATS Server: Incomplete Stripping of Nats-Request-Info Header Allows Identity Spoofing
GHSA-9983-vrx2-fg9c CVE-2026-33222 MODERATE NATS JetStream has an authorization bypass through its Management API
GHSA-55h8-8g96-x4hj CVE-2026-33246 MODERATE NATS: Leafnode connections allow spoofing of Nats-Request-Info identity headers
GHSA-8r68-gvr4-jh7j CVE-2026-33219 MODERATE NATS is vulnerable to pre-auth DoS through WebSockets client service
GHSA-vprv-35vv-q339 CVE-2026-33218 HIGH NATS has pre-auth server panic via leafnode handling
GHSA-jxxm-27vp-c3m5 CVE-2026-33217 HIGH NATS allows MQTT clients to bypass ACL checks
GHSA-v722-jcv5-w7mc CVE-2026-33216 HIGH NATS has MQTT plaintext password disclosure
GHSA-52jh-2xxh-pwh6 CVE-2026-29785 HIGH NATS Server panic via malicious compression on leafnode port
GHSA-pq2q-rcw4-3hr6 CVE-2026-27889 HIGH NATS: Pre-auth remote server crash via WebSocket frame length overflow in wsRead
GHSA-x6g4-f6q3-fqvv CVE-2026-33247 HIGH NATS credentials are exposed in monitoring port via command-line argv
GHSA-fcjp-h8cc-6879 CVE-2026-33215 MODERATE NATS is vulnerable to MQTT hijacking via Client ID
GHSA-8m2x-3m6q-6w8j CVE-2026-33249 MODERATE NATS: Message tracing can be redirected to arbitrary subject
GHSA-qrvq-68c2-7grw CVE-2026-27571 MODERATE nats-server websockets are vulnerable to pre-auth memory DoS
GHSA-hmm9-r2m2-qg9w - HIGH Nil dereference in NATS JWT causing DoS of nats-server
GHSA-2c64-vj8g-vwrq - HIGH Incorrect handling of credential expiry by /nats-io/nats-server
GHSA-2h2x-8hh2-mfq8 CVE-2022-29946 HIGH NATS Server and Streaming Server fails to enforce negative user permissions, may allow denied subjects
GHSA-jj54-5q2m-q7pj CVE-2021-32026 LOW NATS server TLS missing ciphersuite settings when CLI flags used
GHSA-j756-f273-xhp4 - HIGH github.com/nats-io/nats-server Import token permissions checking not enforced
GHSA-9r5x-fjv3-q6h4 - HIGH Duplicate Advisory: Incorrect Access Control in github.com/nats-io/jwt and github.com/nats-io/nats-server/v2
GHSA-fr2g-9hjm-wr23 CVE-2023-47090 HIGH NATS.io: Adding accounts for just the system account adds auth bypass
GHSA-4frv-5fj6-4p25 - MODERATE Duplicate Advisory: NATS.io: Adding accounts for just the system account adds auth bypass
GHSA-mr45-rx8q-wcm9 CVE-2023-46129 HIGH xkeys seal encryption used fixed key for all encryption
GHSA-jp4j-47f9-2vc3 CVE-2019-13126 HIGH Integer Overflow or Wraparound in NATS Server
GHSA-g6w6-r76c-28j7 CVE-2022-24450 HIGH Incorrect Authorization in NATS nats-server
GHSA-6h3m-36w8-hv68 CVE-2022-26652 HIGH Arbitrary file write in nats-server
GHSA-gwj5-3vfq-q992 - LOW Import loops in account imports, nats-server DoS

CVE-2026-58250 at a Glance

CVE Identifier CVE-2026-58250
GHSA Identifier GHSA-3g5q-cfh2-cq67
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-476: NULL Pointer Dereference
Affected Product NATS Server
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.6

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
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-58250

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.11.17
Upgrade github.com/nats-io/nats-server/v2 to 2.11.17
github.com/nats-io/nats-server/v2 fixed: 2.12.8
Upgrade github.com/nats-io/nats-server/v2 to 2.12.8
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-58250, 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.11.17), 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-476: NULL Pointer Dereference, where the product dereferences a pointer that it expects to be valid but is null. 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 supports leafnode connections between servers. ### Problem Description An unauthenticated peer with network access to a leafnode listener with compression enabled could crash the server during the pre-authentication leafnode handshake. The issue occurs after repeated leafnode `INFO` protocol messages before a leafnode connection had completed authentication and account setup. Certain state expected later in the handshake could be nil and then later dereferenced, causing a process panic. ### Affected Versions Versions v2.12.7, v2.11.16 and below are vulnerable. The issue is fixed in v2.12.8 and v2.11.17. ### Workarounds Disabling leafnode compression can mitigate the issue until fixed versions are deployed. ### Resources * GHSA advisory: <https://github.com/nats-io/nats-server/security/advisories/GHSA-3g5q-cfh2-cq67> * Credit: Koda Reef

CVE-2026-58250 Affected NATS Server Versions

2 component(s)
Fixed Versions:
2.11.172.12.8
Product / Package Ecosystem Affected Versions Fixed Version
github.com/nats-io/nats-server/v2
Go
< 2.11.17
2.11.17
github.com/nats-io/nats-server/v2
Go
≥ 2.12.0-RC.1
< 2.12.8
2.12.8

References

Frequently Asked Questions

What is CVE-2026-58250?
CVE-2026-58250 is a security vulnerability in NATS Server involving Denial of service via repeated pre-authentication leafnode INFO messages under CWE-476: NULL Pointer Dereference.
Which NATS Server versions are affected?
Affected versions include releases prior to 2.11.17, 2.12.8 across affected packages: github.com/nats-io/nats-server/v2.
What version fixes CVE-2026-58250?
Upgrading to 2.11.17, 2.12.8 (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.11.17, 2.12.8. Upgrade your dependency to 2.11.17, 2.12.8 or later.
What is the CVSS score of CVE-2026-58250?
CVE-2026-58250 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H.
What CWE is associated with CVE-2026-58250?
CVE-2026-58250 is classified under CWE-476: NULL Pointer Dereference (The product dereferences a pointer that it expects to be valid but is NULL.).
How can I check Go dependencies for CVE-2026-58250?
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-3g5q-cfh2-cq67",
  "modified" : "2026-12-01T21:20:07Z",
  "published" : "2026-12-01T21:20:07Z",
  "aliases" : [ "CVE-2026-58250" ],
  "summary" : "NATS Server: Denial of service via repeated pre-authentication leafnode INFO messages",
  "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 supports leafnode connections between servers.\n\n### Problem Description\n\nAn unauthenticated peer with network access to a leafnode listener with compression enabled could crash the server during the pre-authentication leafnode handshake.\n\nThe issue occurs after repeated leafnode `INFO` protocol messages before a leafnode connection had completed authentication and account setup. Certain state expected later in the handshake could be nil and then later dereferenced, causing a process panic.\n\n### Affected Versions\n\nVersions v2.12.7, v2.11.16 and below are vulnerable. The issue is fixed in v2.12.8 and v2.11.17.\n\n### Workarounds\n\nDisabling leafnode compression can mitigate the issue until fixed versions are deployed.\n\n### Resources\n\n * GHSA advisory: <https://github.com/nats-io/nats-server/security/advisories/GHSA-3g5q-cfh2-cq67>\n * Credit: Koda Reef",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/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.11.17"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/nats-io/nats-server/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.12.0-RC.1"
      }, {
        "fixed" : "2.12.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/security/advisories/GHSA-3g5q-cfh2-cq67"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-58250"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/commit/8dcb26eaea78fdcbe96dbee5986d6019fd5cb94a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/commit/fc5fe39177533e9dbdd651d2458285bfae1dde27"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nats-io/nats-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/releases/tag/v2.11.17"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/releases/tag/v2.12.8"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-476" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-01T21:20:07Z",
    "nvd_published_at" : "2026-07-08T20:16:54Z"
  }
}