Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
HIGH severity

Incorrect Authorization in NATS nats-serverGHSA-g6w6-r76c-28j7

HIGH

GHSA-g6w6-r76c-28j7 is a high-severity (CVSS 8.8) CWE-862 vulnerability in github.com/nats-io/nats-server/v2. A fix is available for github.com/nats-io/nats-server/v2 — see the affected versions and patch details below.

Also known asBIT-nats-2022-24450CVE-2022-24450GO-2022-0307
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Oct 11, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs70th percentile — riskier than 70% of all scored CVEsHighest risk
0.03%0.63%1.23%1.83%0.5%1.3%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-g6w6-r76c-28j7 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

2 pkgs affected
🐹github.com/nats-io/nats-server/v2🐹github.com/nats-io/nats-streaming-server

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

(This advisory is canonically https://advisories.nats.io/CVE/CVE-2022-24450.txt)

Problem Description

NATS nats-server through 2022-02-04 has Incorrect Access Control, with unchecked ability for clients to authorize into any account, because of a coding error in a long-extant experimental feature.

A client crafting the initial protocol-level handshake could, with valid credentials for any account, specify a target account and switch into it immediately. This includes any other tenant, and includes the System account which controls nats-server core operations.

For deployments not using multi-tenancy through NATS Accounts, there is still a vulnerability: normal users are able to choose to be in the System account.

An experimental feature to provide dynamically provisioned sandbox accounts was designed to allow a server administrator to turn on an option to allow clients to dynamically request a brand new account inline at connection time. This feature went nowhere, but lived on in the code and was used by a number of tests; support was never added to any client libraries or to the documentation.

A bug in handling the feature meant that if someone did in fact have valid account credentials, then they could specify any other existing account and they would be assigned into that account.

Release 2.7.2 of nats-server removes the feature. Because of the lack of client support and absence from protocol documentation, we feel this is safe operationally as well as the safest fix for the code.

Affected versions

NATS Server

  • All 2.x versions up to and including 2.7.1.
  • Fixed with nats-io/nats-server: 2.7.2
  • NATS Server 1.x did not have accounts.
  • Docker image: nats https://hub.docker.com/_/nats

NATS Streaming Server

  • All versions embedding affected NATS Server:
    • Affected: v0.15.0 up to and including v0.24.0
    • Fixed with nats-io/nats-streaming-server: 0.24.1
  • Docker image: nats-streaming https://hub.docker.com/_/nats-streaming

Impact

Existing users could act in any account, including the System account.

Workaround

None.

Solution

Upgrade the NATS server.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/nats-io/nats-server/v2≥ 2.0.0&&< 2.7.22.7.2go get github.com/nats-io/nats-server/v2@v2.7.2
🐹Gogithub.com/nats-io/nats-streaming-server≥ 0.15.0&&< 0.24.10.24.1go get github.com/nats-io/nats-streaming-server@v0.24.1

Affected Products

2 products · 2 configurations
Application
nats-serverlinuxfoundation
≥ 2.0.0 && < 2.7.2
range
Application
nats streaming servernats
≥ 0.15.0 && < 0.24.1
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/nats-io/nats-server/v2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/nats-io/nats-server/v2 to 2.7.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-g6w6-r76c-28j7 is resolved across your whole dependency graph.

  3. Workarounds

    Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.

Frequently Asked Questions

(This advisory is canonically <https://advisories.nats.io/CVE/CVE-2022-24450.txt>) ## Problem Description NATS nats-server through 2022-02-04 has Incorrect Access Control, with unchecked ability for clients to authorize into any account, because of a coding error in a long-extant experimental feature. A client crafting the initial protocol-level handshake could, with valid credentials for any account, specify a target account and switch into it immediately. This includes any other tenant, and includes the System account which controls nats-server core operations. For deployments not using
O3 Security · Impact-Aware SCA

Is GHSA-g6w6-r76c-28j7 in your dependencies?

Find it across Go, including transitive dependencies.

Incorrect Authorization in NATS nats-server (High 8.8)