CVE-2026-58254: nats-server Leaf node connections bypass Nats-Trace-Dest permission check
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
Other sources
NATS Server is a high-performance server for NATS.io, the cloud and edge native messaging system. Prior to 2.14.3 and 2.12.8, message trace destination checks were applied to ordinary client connections but not consistently to messages arriving through leafnode connections, allowing a leafnode operator to send trace events to subjects that would not otherwise be permitted and to use trace-only behavior to prevent normal delivery or storage of affected messages. This issue is fixed in versions 2.14.3 and 2.12.8.
— MITRE
nats-server Leaf node connections bypass Nats-Trace-Dest permission check in github.com/nats-io/nats-server/v2
— OSV
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/nats-io/nats-server/v2to a version that resolves this vulnerability.Fixed in 2.14.3 - Upgrade
Upgrade
go/github.com/nats-io/nats-server/v2to a version that resolves this vulnerability.Fixed in 2.12.8 - Upgrade
Upgrade
debian/nats-serverto a version that resolves this vulnerability.Fixed in 2.14.3-1 - Upgrade
Upgrade
bitnami/natsto a version that resolves this vulnerability.Fixed in 2.12.8 - Upgrade
Upgrade
bitnami/natsto a version that resolves this vulnerability.Fixed in 2.14.3 - Upgrade
Upgrade
github.com/nats-io/nats-server/v2to a version that resolves this vulnerability.Fixed in 2.14.3 - Upgrade
Upgrade
github.com/nats-io/nats-server/v2to a version that resolves this vulnerability.Fixed in 2.12.8 - Compensating control
Where possible, avoid granting publish paths from less-trusted leaf nodes into subjects for which trace-only behavior would affect delivery guarantees.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-58254?
CVE-2026-58254 has a medium severity rating of 5.3.
How do I fix CVE-2026-58254?
To fix CVE-2026-58254, upgrade to NATS Server version 2.14.3 or 2.12.8 and ensure the Leaf node connection checks are applied correctly.
What components are affected by CVE-2026-58254?
CVE-2026-58254 affects NATS Server versions prior to 2.14.3 and 2.12.8.
What type of vulnerability is CVE-2026-58254?
CVE-2026-58254 is a permission check bypass vulnerability related to leaf node connections.
Are messages sent through leaf node connections impacted by CVE-2026-58254?
Yes, messages arriving through leaf node connections can bypass Nats-Trace-Dest permission checks due to CVE-2026-58254.