Vulnerabilities in pkg:golang/github.com/nats-io/nats-server/v2
PACKAGECVE-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.
pkg:golang/github.com/nats-io/nats-server/v2
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
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).
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.
Upgrade github.com/nats-io/nats-server/v2 to 2.11.17
Upgrade github.com/nats-io/nats-server/v2 to 2.12.8
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
CVE-2026-58250 Affected NATS Server Versions
2 component(s)| 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?
Which NATS Server versions are affected?
What version fixes CVE-2026-58250?
Is github.com/nats-io/nats-server/v2 affected?
What is the CVSS score of CVE-2026-58250?
What CWE is associated with CVE-2026-58250?
How can I check Go dependencies for CVE-2026-58250?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}