CVE-2020-26521
mediumpriority · track · 31EPSS 0.022 · 82 %ileEUUSEPSS · scored 2026-10-27
The JWT library in NATS nats-server before 2.1.9 allows a denial of service (a nil dereference in Go code).
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 5–7.5
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (5)
Products and version ranges known to be affected.
advisories (3)
Vendor and ecosystem advisories describing this.
- GHSA-h2fg-54x9-5qhqNil dereference in NATS JWT, DoS of nats-server2022-02-11ghsa · osvUS
## 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.
- GHSA-hmm9-r2m2-qg9wNil dereference in NATS JWT causing DoS of nats-server2021-05-21ghsa · osvUS
(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.
- GO-2022-0402Panic in NATS JWT decoding in github.com/nats-io/jwt2022-07-01vendor · osvUS
A malicious account can create and sign a User JWT which causes a panic when decoded by the NATS JWT library.
also known as (6)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (11)
External citations — patches, advisories, analysis.
- http://www.openwall.com/lists/oss-security/2020/11/02/2cnnvd
- https://github.com/nats-io/nats-server/commits/mastercnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VT67XCLIIBYRT762SVFBYFFTQFVSM3SI/cnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2020-26521cnnvd
- https://www.openwall.com/lists/oss-security/2020/11/02/2Patchcnnvd
- http://www.openwall.com/lists/oss-security/2020/11/02/2enisa_euvd
- https://github.com/nats-io/nats-server/commits/masterenisa_euvd
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VT67XCLIIBYRT762SVFBYFFTQFVSM3SI/enisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan