Advisory

GHSA-52jh-2xxh-pwh6

Also known as: BIT-nats-2026-29785, CVE-2026-29785, GO-2026-4829

Summary

NATS Server panic via malicious compression on leafnode port

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.

When configured to accept leafnode connections (for a hub/spoke topology of multiple nats-servers), then the default configuration allows for negotiating compression; a malicious remote NATS server can trigger a server panic via that compression.

Problem Description

If the nats-server has the "leafnode" configuration enabled (not default), then anyone who can connect can crash the nats-server by triggering a panic. This happens pre-authentication and requires that compression be enabled (which it is, by default, when leafnodes are used).

Context: a NATS server can form various clustering topologies, including local clusters, and superclusters of clusters, but leafnodes allow for separate administrative domains to link together with limited data communication; eg, a server in a moving vehicle might use a local leafnode for agents to connect to, and sync up to a central service as and when available. The leafnode configuration here is where the central server allows other NATS servers to connect into it, almost like regular NATS clients. Documentation examples typically use port 7422 for leafnode communications.

Affected Versions

Version 2, prior to v2.11.14 or v2.12.5

Workarounds

Disable compression on the leafnode port:

leafnodes {
  port: 7422
  compression: off
}

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-03-24 21:29 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

github.com/nats-io/nats-server/v2

Go · All systems

Affected

  • introduced 0, fixed 2.11.14 (semver)

Fixed versions

2.11.14

Fix

github.com/nats-io/nats-server/v2

Go · All systems

Affected

  • introduced 2.12.0-RC.1, fixed 2.12.5 (semver)

Fixed versions

2.12.5

Fix

github.com/nats-io/nats-server

Go · All systems

Affected

  • introduced 0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences