{"id":"CVE-2026-58213","aliases":["BIT-nats-2026-58213","GHSA-qrcv-3558-gj4f"],"url":"https://o3.security/vulnerability/CVE-2026-58213","summary":"NATS Server: MQTT SUBSCRIBE Protocol Injection via Leaf Node/Route Forwarding allows arbitrary NATS command injection","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 MQTT clients and can bridge MQTT activity into NATS subjects across routes and leafnode connections.\n\n### Problem Description\n\nAn MQTT client could include protocol control characters in subscription filters that were later forwarded as NATS protocol data to route or leafnode connections.\n\nThis could corrupt the forwarded protocol stream and allow injection of unintended NATS protocol operations, potentially across cluster nodes or accounts where route or gateway connections are present.\n\nAnonymous MQTT deployments are higher risk because no credentials are required to reach the affected parser. Authenticated deployments are still affected for clients allowed to create MQTT subscriptions.\n\n### Affected Versions\n\nVersions v2.14.0, v2.12.8 and below are vulnerable. The issue is fixed in v2.14.1 and v2.12.9.\n\n### Workarounds\n\nDisable anonymous MQTT access where it is not required. Deployments that need MQTT have no known complete workaround other than upgrading.\n\n### References\n\n * GHSA advisory: <https://github.com/nats-io/nats-server/security/advisories/GHSA-qrcv-3558-gj4f>\n * Credit: @thesecguy45","published":"2026-07-08T19:52:12.148Z","modified":"2026-10-28T02:30:32.335392579Z","cvss":{"score":7.1,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N"},"epss":{"score":0.00441,"percentile":0.38983,"asOf":"2026-11-18"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/nats-io/nats-server/v2","fixedVersion":"2.12.9"},{"ecosystem":"Go","name":"github.com/nats-io/nats-server/v2","fixedVersion":"2.14.1"}],"fix":{"url":"https://github.com/nats-io/nats-server/commit/366837cfc65ab9ccb4f98193c65e8daf238582d8","label":"nats-io/nats-server@366837c"},"references":[{"type":"WEB","url":"https://github.com/nats-io/nats-server/releases/tag/v2.12.9"},{"type":"WEB","url":"https://github.com/nats-io/nats-server/releases/tag/v2.14.1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58213.json"},{"type":"ADVISORY","url":"https://github.com/nats-io/nats-server/security/advisories/GHSA-qrcv-3558-gj4f"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58213"},{"type":"FIX","url":"https://github.com/nats-io/nats-server/commit/366837cfc65ab9ccb4f98193c65e8daf238582d8"},{"type":"FIX","url":"https://github.com/nats-io/nats-server/commit/64ebae40051ee497c481e10f316238faf0de1736"},{"type":"FIX","url":"https://github.com/nats-io/nats-server/commit/f14856b9e57a36818f43851cb69b6e33670885c9"},{"type":"FIX","url":"https://github.com/nats-io/nats-server/pull/8163"},{"type":"FIX","url":"https://github.com/nats-io/nats-server/pull/8164"},{"type":"PACKAGE","url":"https://github.com/nats-io/nats-server"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:32.335392579Z"}}