HighGHSA-3g5q-cfh2-cq67BIT-nats-2026-58250CVE-2026-58250

NATS Server: Denial of service via repeated pre-authentication leafnode INFO messages

Published 1 Dec 2026 · Updated 1 Dec 2026

Affected packages

Affected
<2.11.17
Fixed in
2.11.17
Update to the fixed version for your release line, for example:go get github.com/nats-io/nats-server/v2@v2.11.17
Affected
>=2.12.0-RC.1 <2.12.8
Fixed in
2.12.8
Update to the fixed version for your release line, for example:go get github.com/nats-io/nats-server/v2@v2.12.8

We confirm your address first. See our privacy policy.

Which github.com/nats-io/nats-server/v2 does your project really install?

Drop your go.mod hereWe find the exact github.com/nats-io/nats-server/v2 version you install, even when another package pulls it in, and tell you if it’s affected and what to run. Free, no sign-up.

Works for private projects: the file is read in memory to run the scan and then dropped. Also reads other package files.

Public repo?

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

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.

Problem Description

An unauthenticated peer with network access to a leafnode listener with compression enabled could crash the server during the pre-authentication leafnode handshake.

The issue occurs after repeated leafnode INFO protocol messages before a leafnode connection had completed authentication and account setup. Certain state expected later in the handshake could be nil and then later dereferenced, causing a process panic.

Affected Versions

Versions v2.12.7, v2.11.16 and below are vulnerable. The issue is fixed in v2.12.8 and v2.11.17.

Workarounds

Disabling leafnode compression can mitigate the issue until fixed versions are deployed.

Resources

  • GHSA advisory: <https://github.com/nats-io/nats-server/security/advisories/GHSA-3g5q-cfh2-cq67>
  • Credit: Koda Reef

Is GHSA-3g5q-cfh2-cq67 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/nats-io/nats-server/v2, and gives you the command that fixes it.

More advisories for github.com/nats-io/nats-server/v2

  • LowCVE-2026-58214NATS Server MQTT subscribe permission bypass exposes internal QoS 2 metadata in github.com/nats-io/nats-server/v2 · 23 Nov 2026
  • LowCVE-2026-58213NATS Server: MQTT SUBSCRIBE Protocol Injection via Leaf Node/Route Forwarding allows arbitrary NATS command injection in github.com/nats-io/nats-server/v2 · 23 Nov 2026
  • LowCVE-2026-58209NATS Server MQTT retained messages and QoS replay bypass subscription deny rules in github.com/nats-io/nats-server/v2 · 23 Nov 2026
  • LowCVE-2026-58208NATS Server: MQTT-over-WebSocket Path Can Crash WebSocket-Only JetStream Servers Before MQTT Is Enabled in github.com/nats-io/nats-server/v2 · 23 Nov 2026
  • LowCVE-2026-58210NATS Server allows unauthenticated memory exhaustion through incomplete MQTT CONNECT packets in github.com/nats-io/nats-server/v2 · 23 Nov 2026
  • LowCVE-2026-58254nats-server Leaf node connections bypass Nats-Trace-Dest permission check in github.com/nats-io/nats-server/v2 · 23 Nov 2026
All 64 advisories for github.com/nats-io/nats-server/v2

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.