Skip to main content

NATS Server CVE-2026-58213

| EUVDEUVD-2026-42383 HIGH
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-07-06 vendor:ubuntu
7.1
CVSS 3.1 · Vendor: vendor:ubuntu
Share

Severity by source

Vendor (vendor:ubuntu) PRIMARY
7.1 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
vuln.today AI
7.1 HIGH

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.

3.1 AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:L/SI:L/SA:N
Red Hat
7.1 HIGH
qualitative

Primary rating from Vendor (vendor:ubuntu).

CVSS VectorVendor: vendor:ubuntu

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

Lifecycle Timeline

7
Patch available
Jul 08, 2026 - 21:04 EUVD
Analysis Updated
Jul 08, 2026 - 20:32 vuln.today
v3 (cvss_changed)
Source Code Evidence Fetched
Jul 08, 2026 - 20:32 vuln.today
Analysis Updated
Jul 08, 2026 - 20:32 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Jul 08, 2026 - 20:22 vuln.today
cvss_changed
CVSS changed
Jul 08, 2026 - 20:22 NVD
7.1 (HIGH)
Analysis Generated
Jul 06, 2026 - 20:18 vuln.today

DescriptionCVE.org

[Unknown description]

AnalysisAI

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.

Technical ContextAI

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.

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.

CVE-2021-3127 HIGH POC
7.5 Mar 16

NATS Server 2.x before 2.2.0 and JWT library before 2.0.1 have Incorrect Access Control because Import Token bindings ar

CVE-2020-26892 CRITICAL
9.8 Nov 06

The JWT library in NATS nats-server before 2.1.9 has Incorrect Access Control because of how expired credentials are han

CVE-2020-28466 HIGH
7.5 Mar 07

This affects all versions of package github.com/nats-io/nats-server/server. Rated high severity (CVSS 7.5), this vulnera

CVE-2022-24450 HIGH
8.8 Feb 08

NATS nats-server before 2.7.2 has Incorrect Access Control. Rated high severity (CVSS 8.8), this vulnerability is remote

CVE-2026-58253 HIGH
8.8 Jul 06

Authentication bypass in NATS Server (nats-io/nats-server) lets an unauthenticated attacker on an adjacent network conne

CVE-2026-58210 HIGH
7.5 Jul 06

Denial of service in NATS Server (nats-server) MQTT handler allows a remote, unauthenticated client to exhaust server me

CVE-2026-58250 HIGH
7.5 Jul 06

Remote denial of service in the NATS Server (nats-io/nats-server) leafnode subsystem allows unauthenticated attackers to

CVE-2019-13126 HIGH
7.5 Jul 29

An integer overflow in NATS Server before 2.0.2 allows a remote attacker to crash the server by sending a crafted reques

CVE-2026-58208 HIGH
7.5 Jul 06

Remote denial-of-service in NATS Server (nats-server) affects deployments with the WebSocket listener enabled but MQTT d

CVE-2023-46129 HIGH
7.5 Oct 31

NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise,

CVE-2020-26521 HIGH
7.5 Nov 06

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

CVE-2022-26652 MEDIUM
6.5 Mar 10

NATS nats-server before 2.7.4 allows Directory Traversal (with write access) via an element in a ZIP archive for JetStre

Vendor StatusVendor

Share

CVE-2026-58213 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy