Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/nats-io/nats-server/v2
  4. ›
  5. CVE-2026-29785

CVE-2026-29785: NATS Server panic via malicious compression on leafnode port

March 24, 2026 (updated March 27, 2026)

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
}

References

  • advisories.nats.io/CVE/secnote-2026-04.txt
  • github.com/advisories/GHSA-52jh-2xxh-pwh6
  • github.com/nats-io/nats-server
  • github.com/nats-io/nats-server/commit/a1488de6f2ba6e666aef0f9cce0016f7f167d6a8
  • github.com/nats-io/nats-server/security/advisories/GHSA-52jh-2xxh-pwh6
  • nvd.nist.gov/vuln/detail/CVE-2026-29785

Code Behaviors & Features

Detect and mitigate CVE-2026-29785 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.11.14, all versions starting from 2.12.0-RC.1 before 2.12.5

Fixed versions

  • 2.11.14
  • 2.12.5

Solution

Upgrade to versions 2.11.14, 2.12.5 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-476: NULL Pointer Dereference

Source file

go/github.com/nats-io/nats-server/v2/CVE-2026-29785.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:18:29 +0000.