CVE-2026-58254 — nats-server Leaf node connections bypass Nats-Trace-Dest permission check
One of 4 go:github.com/nats-io/nats-server/v2 vulnerabilities published together by GitHub Advisory: our article covers all of them.
GoWebCloud & containersIoTVulnerabilitiesSeverity breakdown
Medium · 5.3
An attacker with a normal user account can exploit this over the network, without any user action.
- Attack from
- the network (remotely)
- Attack complexity
- low (no special conditions)
- Special conditions
- none
- Login needed
- yes, a normal user account
- User action needed
- no
- Impact
- low on confidentiality, integrity and availability
- Impact on other systems
- none
Weakness
- CWE-863: Incorrect Authorization
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| github.com/nats-io/nats-server/v2 (Go) | < 2.12.8 | 2.12.8 |
| ≥ 2.14.0-RC.1, < 2.14.3 | 2.14.3 | |
| nats-io nats-server | < 2.12.8, >= 2.14.0-RC.1, < 2.14.3 | — |
References by type
Vendor advisories
Patches and fixed releases
- github.com/nats-io/nats-server/commit/cbe845932980b71563efac5cfa4cc751c…
- github.com/nats-io/nats-server/releases/tag/v2.12.8
- github.com/nats-io/nats-server/releases/tag/v2.14.3
Other references
Details
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 leafnode connections between servers and message tracing through NATS headers.
Problem Description
Message trace destination checks were applied to ordinary client connections but not consistently to messages arriving through leafnode connections.
A leafnode operator could cause trace events to be sent to subjects that would not otherwise be permitted and could use trace-only behavior to prevent normal delivery or storage of affected messages.
Trace events can include routing, subscription, account, service import and JetStream metadata. The payload of the original application message is not chosen through the trace event itself.
Affected Versions
Versions v2.14.2, v2.12.7 and below are vulnerable. The issue is fixed in v2.14.3 and v2.12.8.
Workarounds
Where possible, avoid granting publish paths from less-trusted leaf nodes into subjects for which trace-only behavior would affect delivery guarantees. No other known workarounds are available aside from upgrading to a fixed release.
References
- GHSA advisory: <https://github.com/nats-io/nats-server/security/advisories/GHSA-p3j5-5hrq-p75h>
- Credit: Koda Reef
Affected
- go:github.com/nats-io/nats-server/v2
What to do
- Follow the vendor advisory and the references below for fixed versions and workarounds.
Frequently asked questions
What is CVE-2026-58254?
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 leafnode connections between servers and message tracing through NATS headers. Weakness type: Incorrect Authorization (CWE-863).
How severe is CVE-2026-58254?
CVE-2026-58254 has a CVSS 4.0 base score of 5.3 (medium), from the CNA (github.com). An attacker with a normal user account can exploit this over the network, without any user action.
Is CVE-2026-58254 being exploited?
Not as far as is known: CVE-2026-58254 is not in CISA's Known Exploited Vulnerabilities catalog as of November 28, 2026. EPSS estimates a 0.3% chance that it is exploited in the next 30 days.
Which versions are affected by CVE-2026-58254?
github.com/nats-io/nats-server/v2 (Go) < 2.12.8 (fixed in 2.12.8); github.com/nats-io/nats-server/v2 (Go) ≥ 2.14.0-RC.1, < 2.14.3 (fixed in 2.14.3); nats-io nats-server < 2.12.8, >= 2.14.0-RC.1, < 2.14.3.
How do I fix CVE-2026-58254?
Update to a fixed release: github.com/nats-io/nats-server/v2 (Go) 2.12.8; github.com/nats-io/nats-server/v2 (Go) 2.14.3.
Timeline & sources
References
Related vulnerabilities & news
- GHSA-r72h-j7qq-v6qg / CVE-2026-58210 — NATS Server allows unauthenticated memory exhaustion through incomplete MQTT CONNECT packets
- GHSA-qrcv-3558-gj4f / CVE-2026-58213 — NATS Server: MQTT SUBSCRIBE Protocol Injection via Leaf Node/Route Forwarding allows arbitrary NATS command injection
- LLMKube Model.spec.source path traversal allows arbitrary file read (CVE-2026-68903)
- Cocos AI attested TLS: one-time attestation at handshake enables TOCTOU after connection setup (CVE-2026-119345)
- GHSA-f9h7-4mmq-vgcq / CVE-2026-58262 — Klever Go counts bitmap padding bits toward BLS quorum, allowing blocks with insufficient signatures