Improper Handling of Unexpected Data Type Affecting github.com/nats-io/nats-server/v2/server package, versions <2.11.15>=2.12.0-RC.1 <2.12.6


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.62% (45th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMNATSIONATSSERVERV2SERVER-15763391
  • published25 Mar 2026
  • disclosed24 Mar 2026
  • creditUnknown

Introduced: 24 Mar 2026

CVE-2026-33218  (opens in a new tab)
CWE-241  (opens in a new tab)

How to fix?

Upgrade github.com/nats-io/nats-server/v2/server to version 2.11.15, 2.12.6 or higher.

Overview

github.com/nats-io/nats-server/v2/server is an A simple, secure and performant communications system for digital systems, services and devices.

Affected versions of this package are vulnerable to Improper Handling of Unexpected Data Type through the leafnode connection handling in setLeafConnectDelayIfSoliciting in the **server/leafnode.go component. An attacker can crash the server by sending a malformed pre-authentication leafnode message, such as a loop-detected -ERR before CONNECT.

Workaround

This vulnerability can be mitigated by disabling leafnode support if not needed or by restricting network connections to the leafnode port.

CVSS Base Scores

version 4.0
version 3.1