Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go

GHSA-hmm9-r2m2-qg9w

HIGH

Nil dereference in NATS JWT causing DoS of nats-server

Also known asCVE-2020-26521GHSA-h2fg-54x9-5qhqGO-2022-0402
Published
May 21, 2021
Updated
Feb 4, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
2.1%probability of exploitation in next 30 days
Lower Risk79th percentile+1.41%
0.18%0.98%1.79%2.59%0.7%2.1%Dec 25Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

1 pkg affected
🐹github.com/nats-io/nats-server/v2

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-2020-26521.txt)

Problem Description

The NATS account system has an Operator trusted by the servers, which signs Accounts, and each Account can then create and sign Users within their account. The Operator should be able to safely issue Accounts to other entities which it does not fully trust.

A malicious Account could create and sign a User JWT with a state not created by the normal tooling, such that decoding by the NATS JWT library (written in Go) would attempt a nil dereference, aborting execution.

The NATS Server is known to be impacted by this.

Affected versions

JWT library

  • all versions prior to 1.1.0

NATS Server

  • Version 2 prior to 2.1.9

Impact

JWT library

  • Programs would nil dereference and panic, aborting execution by default.

NATS server

  • Denial of Service caused by process termination

Workaround

If your NATS servers do not trust any accounts which are managed by untrusted entities, then malformed User credentials are unlikely to be encountered.

Solution

Upgrade the JWT dependency in any application using it.

Upgrade the NATS server if using NATS Accounts.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/nats-io/nats-server/v2all versions2.1.9

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. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

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

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-hmm9-r2m2-qg9w is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-hmm9-r2m2-qg9w. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

(This advisory is canonically <https://advisories.nats.io/CVE/CVE-2020-26521.txt>) ## Problem Description The NATS account system has an Operator trusted by the servers, which signs Accounts, and each Account can then create and sign Users within their account. The Operator should be able to safely issue Accounts to other entities which it does not fully trust. A malicious Account could create and sign a User JWT with a state not created by the normal tooling, such that decoding by the NATS JWT library (written in Go) would attempt a nil dereference, aborting execution. The NATS Server is
O3 Security · Impact-Aware SCA

Is GHSA-hmm9-r2m2-qg9w in your dependencies?

O3 detects GHSA-hmm9-r2m2-qg9w across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-hmm9-r2m2-qg9w: Nil dereference in NATS JWT causing DoS of… | O3 Security