HIGH · CVSS 3.1 7.1 EPSS 0.4% · 39th percentile CWE-74

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

Published 2026-11-19 · Updated 2026-11-23 · Also known as BIT-nats-2026-58213, GHSA-qrcv-3558-gj4f, GO-2026-7000

Summary

A protocol injection vulnerability in NATS Server allows MQTT clients to inject arbitrary NATS protocol operations by including control characters in MQTT subscription filters. Engineering and operations teams maintaining NATS Server instances with MQTT enabled should upgrade to a fixed version immediately.

Who is affected

Affected deployments are those running NATS Server with MQTT enabled, particularly where route or leafnode connections bridge MQTT activity across cluster nodes or accounts. Anonymous MQTT deployments carry the highest risk since no credentials are required, though authenticated deployments remain vulnerable to any client authorized to create MQTT subscriptions. Exploitation can corrupt forwarded protocol streams and trigger unintended operations across cluster nodes or accounts.

Exploitability

The vulnerability is network accessible with low attack complexity, requiring low privileges and no user interaction, giving it a CVSS 3.1 base score of 7.1 (High). EPSS estimates the probability of exploitation at 0.004 (0.391 percentile), and it is not currently listed in CISA's Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-23. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Go github.com/nats-io/nats-server/v2 >= 0, < 2.12.9 2.12.9 go get github.com/nats-io/nats-server/[email protected]
Go github.com/nats-io/nats-server/v2 >= 2.14.0-RC.1, < 2.14.1 2.14.1 go get github.com/nats-io/nats-server/[email protected]

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N

Attack vectorNetwork
Attack complexityLow
Privileges requiredLow
User interactionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityLow
AvailabilityNone

FAQ

What causes this vulnerability in NATS Server?

The server fails to filter protocol control characters present in MQTT subscription filters before forwarding them as NATS protocol data across route or leafnode connections.

Is CVE-2026-58213 actively exploited in the wild?

No, according to the provided CISA Known Exploited Vulnerabilities status, there is no documented active exploitation.

Is there a complete workaround available without upgrading?

No. While disabling anonymous MQTT access reduces risk for unauthenticated vectors, deployments that require MQTT have no known complete workaround other than upgrading to fixed versions.

Original advisory description
### 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 MQTT clients and can bridge MQTT activity into NATS subjects across routes and leafnode connections. ### Problem Description 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. ### Affected Versions Versions v2.14.0, v2.12.8 and below are vulnerable. The issue is fixed in v2.14.1 and v2.12.9. ### Workarounds Disable anonymous MQTT access where it is not required. Deployments that need MQTT have no known complete workaround other than upgrading. ### References * GHSA advisory: <https://github.com/nats-io/nats-server/security/advisories/GHSA-qrcv-3558-gj4f> * Credit: @thesecguy45

References

Source records: GHSA-qrcv-3558-gj4f, GO-2026-7000 (OSV.dev) · EPSS by FIRST, 2026-11-23.