Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to MQTT listener
-
DeliveryPublish topic with CR/LF control bytes
-
ExploitTopic converted to NATS subject
-
ExecutionCorrupted control line sent to leaf node
-
PersistNATS parser misframes injected protocol
-
ImpactDisclose or misroute other clients' messages
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
|
| Exploitation Conditions | Requires an authenticated MQTT client session (PR:L) with permission to PUBLISH or to set a Will topic, and the server must have the MQTT interface enabled; the demonstrated wire-protocol corruption further requires the affected topic to be forwarded to another connection such as a leaf node, so a leaf node / federated deployment is the concrete condition that makes the injection impactful. Limiting factors: exploitation is not possible against servers with MQTT disabled or standalone servers with no leaf node forwarding, and it needs valid MQTT authentication rather than fully anonymous access - subscribe/unsubscribe filters are deliberately excluded because they already fail safely via SUBACK, so only the publish/Will path is exploitable. |
| Impact | The supplied CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N, base 7.1) marks this network-reachable, low-complexity, requiring low privileges (PR:L = an authenticated MQTT session) with high confidentiality impact and low integrity impact - consistent with subject injection that can expose or misroute messages. Real-world risk is gated by preconditions the base score understates: the MQTT interface must be enabled and, for the demonstrated wire-protocol corruption, the deployment must use leaf node topology, which is why an independent assessment raises attack complexity. There is no EPSS score, no SSVC decision, no KEV listing, and no POC in the provided data, so this is a genuine but conditional issue rather than a mass-exploitation event - the confidentiality-high rating and the possibility of cross-connection injection warrant prompt patching in multi-tenant or federated NATS clusters, while single-server deployments without MQTT or leaf nodes are largely unaffected. |
| Exploit ScenarioDerived | An attacker who holds valid credentials for a NATS MQTT account connects and PUBLISHes to a topic containing carriage-return/line-feed and other control bytes; when the server converts that topic to a NATS subject and forwards it over a leaf node connection, the embedded characters break the wire-protocol framing, allowing the attacker to influence message routing or inject protocol elements that disclose messages destined for other connections. Attack complexity is low at the protocol layer but depends on MQTT and leaf node connectivity being configured; no public POC was provided in the source data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv3 – Jul 08, 2026
Protocol injection in NATS Server MQTT support allows an authenticated MQTT client to smuggle control characters (tab, newline, carriage return, form feed) inside publish and Will topics, which corrupt the NATS wire protocol when the topic is converted to a NATS subject and forwarded across leaf node connections. Fixed in nats-server v2.12.9 and v2.14.1, the flaw (GHSA-qrcv-3558-gj4f, CWE-74) is tagged Information Disclosure and lets a low-privileged publisher influence how messages are framed and routed to other connections. No public exploit identified at time of analysis and it is not listed in CISA KEV.
Earlier versions of this analysis (2)
Improper MQTT topic validation in NATS Server (nats-io/nats-server) lets an authenticated MQTT client inject control characters (tab, newline, carriage return, form feed) into topics that are forwarded to other connections — notably leaf nodes — as NATS wire-protocol subjects, corrupting the protocol stream. Because the vendor CVSS marks confidentiality High, the resulting subject/protocol manipulation is treated as an information-disclosure path across connections, though NATS/Ubuntu supply no free-text description. There is no public exploit identified at time of analysis and it is not listed in CISA KEV; fixes are shipped in v2.12.9 and v2.14.1.
CVE-2026-58213 has been reported by Ubuntu as the vendor source, but no description, CVSS data, CWE classification, or supplementary intelligence is available at time of analysis. The affected component, vulnerability class, and impact cannot be characterized without a published description. Security teams should monitor the Ubuntu Security Notices (USN) portal and the NVD entry for this CVE for updates as disclosure matures.
RemediationAI
Vendor-released patch: upgrade to nats-server v2.12.9 (2.12.x line) or v2.14.1 (2.14.x line), which add mqttValidatePublishTopic to reject framing control characters in MQTT publish and Will topics (see fix commits 366837c, 64ebae4, f14856b and pull requests https://github.com/nats-io/nats-server/pull/8163 and https://github.com/nats-io/nats-server/pull/8164, plus advisory https://github.com/nats-io/nats-server/security/advisories/GHSA-qrcv-3558-gj4f). If immediate upgrade is not possible, reduce exposure by disabling the MQTT listener (the mqtt config block) where MQTT is not required, which removes the injection surface entirely at the cost of MQTT client connectivity; where MQTT is needed, tighten authentication and per-account publish permissions to trusted clients only and avoid bridging untrusted MQTT accounts into leaf node topologies, accepting that this constrains legitimate federation but limits which principals can reach the vulnerable forwarding path.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
NATS Server is a high-performance cloud-native messaging system (CNCF) that also speaks MQTT and bridges MQTT topics into its own text-based line protocol. The root cause is CWE-74 (improper neutralization of special elements / injection): mqttParsePub and mqttParseConnect validated topics only with mqttValidateTopic, which did not reject whitespace and framing control bytes. When an MQTT topic is translated via mqttTopicToNATSPubSubject into a NATS subject and that subject is emitted onto a leaf node connection (e.g. as an HMSG control line), embedded \t \n \r \f characters break the space/CRLF-delimited NATS protocol grammar. The patch introduces mqttValidatePublishTopic, which additionally rejects those characters on the publish path only - subscribe/unsubscribe filters keep the old behavior so per-filter conversion still returns a SUBACK failure rather than disconnecting the client.
Know when Nats Server gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
Authenticated MQTT publish gives PR:L; dependence on MQTT plus leaf-node forwarding raises AC:H; injection crosses into the leaf node connection's subject space, so S:C with C:H, I:L.
Primary rating from Vendor (vendor:ubuntu).
CVSS VectorVendor: vendor:ubuntu
Lifecycle Timeline
4DescriptionCVE.org
[Unknown description]
Executive ViewAI
NATS Server MQTT support contains a protocol injection vulnerability (CVE-2026-58213, CVSS 7.1) allowing authenticated clients to smuggle control characters that corrupt message routing in leaf node connections. While no public exploit identified at time of analysis, the flaw enables low-privileged publishers to influence message framing and routing behavior, affecting availability and integrity of distributed NATS deployments using MQTT.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
More in Nats Server
View allNATS Server 2.x before 2.2.0 and JWT library before 2.0.1 have Incorrect Access Control because Import Token bindings ar
The JWT library in NATS nats-server before 2.1.9 has Incorrect Access Control because of how expired credentials are han
This affects all versions of package github.com/nats-io/nats-server/server. Rated high severity (CVSS 7.5), this vulnera
NATS nats-server before 2.7.2 has Incorrect Access Control. Rated high severity (CVSS 8.8), this vulnerability is remote
Authentication bypass in NATS Server (nats-io/nats-server) lets an unauthenticated attacker on an adjacent network conne
Denial of service in NATS Server (nats-server) MQTT handler allows a remote, unauthenticated client to exhaust server me
Remote denial of service in the NATS Server (nats-io/nats-server) leafnode subsystem allows unauthenticated attackers to
An integer overflow in NATS Server before 2.0.2 allows a remote attacker to crash the server by sending a crafted reques
Remote denial-of-service in NATS Server (nats-server) affects deployments with the WebSocket listener enabled but MQTT d
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise,
The JWT library in NATS nats-server before 2.1.9 allows a denial of service (a nil dereference in Go code). Rated high s
NATS nats-server before 2.7.4 allows Directory Traversal (with write access) via an element in a ZIP archive for JetStre
EUVD-2026-42383
GHSA-qrcv-3558-gj4f
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB