MediumGHSA-3f24-pcvm-5jqcBIT-nats-2026-33248CVE-2026-33248GO-2026-4828

NATS has mTLS verify_and_map authentication bypass via incorrect Subject DN matching

Published 24 Mar 2026 · Updated 10 Sept 2026

Is your project on an affected github.com/nats-io/nats-server/v2?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

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

Affected packages

Affected
<2.11.15
Fixed in
2.11.15
Update to the fixed version for your release line, for example:go get github.com/nats-io/nats-server/v2@v2.11.15
Affected
>=2.12.0-RC.1 <2.12.6
Fixed in
2.12.6
Update to the fixed version for your release line, for example:go get github.com/nats-io/nats-server/v2@v2.12.6
Affected
All versions
Fixed in
No fix released

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.

One authentication model supported is mTLS, deriving the NATS client identity from properties of the TLS Client Certificate.

Problem Description

When using mTLS for client identity, with verify_and_map to derive a NATS identity from the client certificate's Subject DN, certain patterns of RDN would not be correctly enforced, allowing for authentication bypass.

This does require a valid certificate from a CA already trusted for client certificates, and DN naming patterns which the NATS maintainers consider highly unlikely.

So this is an unlikely attack. Nonetheless, administrators who have been very sophisticated in their DN construction patterns might conceivably be impacted.

Affected Versions

Fixed in nats-server 2.12.6 & 2.11.15

Workarounds

Developers should review their CA issuing practices.

Is GHSA-3f24-pcvm-5jqc 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-29785NATS Server panic via malicious compression on leafnode port in github.com/nats-io/nats-server · 26 Mar 2026
  • LowCVE-2026-33246NATS: Leafnode connections allow spoofing of Nats-Request-Info identity headers in github.com/nats-io/nats-server · 26 Mar 2026
  • LowCVE-2026-33219NATS is vulnerable to pre-auth DoS through WebSockets client service in github.com/nats-io/nats-server · 26 Mar 2026
  • LowCVE-2026-33222NATS JetStream has an authorization bypass through its Management API in github.com/nats-io/nats-server · 26 Mar 2026
  • LowCVE-2026-33215NATS is vulnerable to MQTT hijacking via Client ID in github.com/nats-io/nats-server · 26 Mar 2026
  • LowCVE-2026-33217NATS allows MQTT clients to bypass ACL checks in github.com/nats-io/nats-server · 26 Mar 2026
All 50 advisories for github.com/nats-io/nats-server/v2

References

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