All vulnerabilities

Go

CVE-2026-58213

NATS Server: MQTT SUBSCRIBE Protocol Injection via Leaf Node/Route Forwarding allows arbitrary NATS command injection

Severity
High 7.1
Published
19 Nov 2026
Last changed
19 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
2.12.9, 2.14.1
Exploit chance
0.4% in the next 30 daysHigher than 38% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Injection (CWE-74)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data · Change some data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
Also known as
BIT-nats-2026-58213, GHSA-qrcv-3558-gj4f
Sources
OSV.dev and GitHub

Description

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 MQTT clients and can bridge MQTT activity into NATS subjects across routes and leafnode connections.

An MQTT client could include protocol control characters in subscription filters that were later forwarded as NATS protocol data to route or leafnode connections.

This 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.

Anonymous 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.

From the GitHub Advisory Database, CC BY 4.0.

Workarounds

Disable anonymous MQTT access where it is not required. Deployments that need MQTT have no known complete workaround other than upgrading.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
github.com/nats-io/nats-server/v2Go · osv:Go:github.com/nats-io/nats-server/v2
  • Every version before 2.12.9
  • From 2.14.0-RC.1 before 2.14.1

About github.com/nats-io/nats-server/v2

References