CVE-2026-58209: Github.com/nats io/nats server/v2 NATS Server MQTT Retained Messages Vulnerability
MODERATECVE-2026-58209 is a MODERATE (CVSS 4.3) nats server mqtt retained messages vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/nats io/nats server/v2 libraries in the Go ecosystem. The issue involves nats server mqtt retained messages and qos replay bypass subscription deny rules. Remediation is available by upgrading affected packages to version 2.12.12, 2.14.3.
CVE-2026-58209 at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2026-58209
To remediate this vulnerability, upgrade all affected Github.com/nats io/nats server/v2 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.12.12
Upgrade github.com/nats-io/nats-server/v2 to 2.14.3
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-58209, inspect your project dependencies for Github.com/nats io/nats server/v2:
inspect dependencies for github.com/nats-io/nats-server/v2
Analyze the terminal output to locate any version of Github.com/nats io/nats server/v2 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Github.com/nats io/nats server/v2, 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-58209 Affected Github.com/nats io/nats server/v2 Versions
2 component(s)| 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-58209?
Which Github.com/nats io/nats server/v2 versions are affected?
What version fixes CVE-2026-58209?
Is github.com/nats-io/nats-server/v2 affected?
What is the CVSS score of CVE-2026-58209?
What CWE is associated with CVE-2026-58209?
How can I check Go dependencies for CVE-2026-58209?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7qmq-8cc4-hxwg",
"modified" : "2026-11-20T00:04:28Z",
"published" : "2026-11-20T00:04:27Z",
"aliases" : [ "CVE-2026-58209" ],
"summary" : "NATS Server MQTT retained messages and QoS replay bypass subscription deny rules",
"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 MQTT support includes retained messages and QoS1+ durable delivery. NATS subscription permissions can allow broad wildcard subscriptions while denying more sensitive subjects.\n\n### Problem Description\n\nMQTT retained message delivery and QoS1+ durable replay could deliver messages whose original topics matched a subscriber's configured subscribe deny rules.\n\nNormal live delivery applied the delivery-time deny check. These MQTT delivery paths did not consistently recheck the concrete original topic before sending the MQTT `PUBLISH` to the subscriber.\n\nThe issue affects MQTT subscribers with broad wildcard subscribe permissions where more specific topics are denied. Normal live delivery can be blocked while retained or replayed delivery still sends the denied topic.\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\nNo known workaround for deployments that require MQTT. Upgrade to a fixed release. Deployments not using MQTT are not affected.\n\n### References\n\n * GHSA advisory: <https://github.com/nats-io/nats-server/security/advisories/GHSA-7qmq-8cc4-hxwg>\n * Credit: Asritha Bodepudi, Trail of Bits",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
} ],
"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-7qmq-8cc4-hxwg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-58209"
}, {
"type" : "WEB",
"url" : "https://github.com/nats-io/nats-server/commit/181b1f51f40b9954c57e9d478e051fb257679356"
}, {
"type" : "WEB",
"url" : "https://github.com/nats-io/nats-server/commit/1c429b6fdc5afd4188cc5faf1127f6334896cd87"
}, {
"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-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-11-20T00:04:27Z",
"nvd_published_at" : "2026-07-08T20:16:53Z"
}
}