🛡️ CVE-2020-26521 — jwt
Description
Nil dereference in NATS JWT, DoS of nats-server
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.
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.
Weakness class
CVE-2020-26521 is classified as CWE-476: NULL Pointer Dereference. A pointer that can be null is used without a check, crashing the process.
Affected software
CVE-2020-26521 is recorded against 1 package.
- github.com/nats-io/jwt
Timeline and source
Published on 11 February 2022 and last revised on 4 February 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from OSV.
References
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
advisories.nats.io (Web)
github.com (Package)
github.com (Web)
lists.fedoraproject.org (Web)
pkg.go.dev (Web)
www.openwall.com (Web)
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| github.com/nats-io/jwt | — | — |
References
Similar Threats
- Critical CVE-2021-3127
- Critical CVE-2020-26892
More CVE 2020 advisories
Browse all of CVE 2020 in the advisory index.
Site Security Check
Is jwt part of your stack?
CVE-2020-26521 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.