MEDIUM · CVSS 3.1 6.5 EPSS 0.3% · 16th percentile CWE-863

CVE-2026-58254: nats-server Leaf node connections bypass Nats-Trace-Dest permission check

Published 2026-11-20 · Updated 2026-11-23 · Also known as BIT-nats-2026-58254, GHSA-p3j5-5hrq-p75h, GO-2026-7025

Summary

nats-server fails to consistently apply message trace destination checks to messages arriving through leafnode connections. Administrators and operators of NATS server deployments utilizing leaf nodes should review their systems and update to fixed versions.

Who is affected

Affected deployments include those running nats-server versions v2.14.2, v2.12.7, and below with leaf node connections enabled. A leafnode operator can exploit this vulnerability to send trace events to subjects that would otherwise not be permitted, and use trace-only behavior to disrupt normal delivery or storage of affected messages.

Exploitability

The vulnerability can be exploited over the network with low attack complexity and requires no privileges or user interaction, resulting in a CVSS base score of 6.5. The vector indicates low confidentiality and integrity impact with no impact on availability. EPSS is currently 0.002 with a 0.130 percentile, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-24. 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.8 2.12.8 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.3 2.14.3 go get github.com/nats-io/nats-server/[email protected]

CVSS 3.1 vector

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

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityLow
IntegrityLow
AvailabilityNone

FAQ

What components are affected by CVE-2026-58254?

The vulnerability affects nats-server (github.com/nats-io/nats-server/v2) specifically concerning leaf node connections and the Nats-Trace-Dest permission check.

Are application message payloads exposed via this trace flaw?

No. The payload of the original application message is not chosen through the trace event itself, though trace events can include routing, subscription, account, service import, and JetStream metadata.

What is the recommended fix if upgrading is not immediately possible?

Aside from upgrading to a fixed release, you can avoid granting publish paths from less-trusted leaf nodes into subjects where trace-only behavior would affect delivery guarantees.

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 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

References

Source records: GHSA-p3j5-5hrq-p75h, GO-2026-7025 (OSV.dev) · EPSS by FIRST, 2026-11-26.