Read the docs
TI-2021-22656 Aliases GHSA-hmm9-r2m2-qg9w

Nil dereference in NATS JWT causing DoS of nats-server

Priority LOW 38CWE-476Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
Denial of service
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-476.

Summary

(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.

Why it matters now

Fix Fixed github.com/nats-io/nats-server/v2 (Go): 2.1.9

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—github.com/nats-io/nats-server/v2 (Go)before 2.1.92.1.9Patch availableGHSA-hmm9-r2m2-qg9w
  • github.com/nats-io/nats-server/v2 (Go) Vendor— Affected before 2.1.9 Fixed in 2.1.9 Patch available GHSA-hmm9-r2m2-qg9w

Remediation

  • Fix · GHSA-hmm9-r2m2-qg9w github.com/nats-io/nats-server/v2 (Go) Fixed in 2.1.9 Advisory →

Timeline

  1. 2026-10-03 Threatist record created from GHSA-hmm9-r2m2-qg9w

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences