CVE-2020-26521
JSON

7.5high

Nil dereference in NATS JWT, DoS of nats-server

Severity
7.5high CVSS:3.1 by NVD
Exploit likelihood
2.16% (higher than 82% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-h2fg-54x9-5qhqGHSA-hmm9-r2m2-qg9wGO-2022-0402

Description

The JWT library in NATS nats-server before 2.1.9 allows a denial of service (a nil dereference in Go code).

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
github.com/nats-io/jwt (Go)before 1.1.0GitHub Advisory Database, Go Vulnerability Database
github.com/nats-io/nats-server/v2 (Go)before 2.1.9GitHub Advisory Database
linuxfoundation nats-serverbefore 2.1.9NVD
fedoraproject fedora33NVD

All scores

GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P

Classification

What each source says

CVE List

The JWT library in NATS nats-server before 2.1.9 allows a denial of service (a nil dereference in Go code).

GitHub Advisory Database

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.

GitHub Advisory Database

(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 Vulnerability Database

A malicious account can create and sign a User JWT which causes a panic when decoded by the NATS JWT library.

NVD (es)

La biblioteca JWT en NATS nats-server versiones anteriores a 2.1.9, permite una denegación de servicio (una desreferencia nil en el código Go)

References

https://github.com/nats-io/nats-server/commits/masterpatch, third-party-advisory, web
http://www.openwall.com/lists/oss-security/2020/11/02/2mailing-list, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VT67XCLIIBYRT762SVFBYFFTQFVSM3SI/vendor-advisory
https://github.com/nats-io/jwt/security/advisories/GHSA-h2fg-54x9-5qhqweb
https://nvd.nist.gov/vuln/detail/CVE-2020-26521advisory
https://github.com/nats-io/jwt/pull/107fix, web
https://github.com/nats-io/nats-server/commit/9ff8bcde2e46009e98bd9e88f598af355f62c168web
https://advisories.nats.io/CVE/CVE-2020-26521.txtweb
https://github.com/nats-io/jwtpackage
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VT67XCLIIBYRT762SVFBYFFTQFVSM3SIweb
https://pkg.go.dev/vuln/GO-2022-0402web
https://github.com/nats-io/nats-server/security/advisories/GHSA-hmm9-r2m2-qg9wweb

Related

Sources

SourceRecordLicence
CVE ListCVE-2020-26521 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-h2fg-54x9-5qhq changed 2026-09-10CC-BY-4.0
GitHub Advisory DatabaseGHSA-hmm9-r2m2-qg9w changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2022-0402 changed 2026-02-04CC-BY-4.0
NVDCVE-2020-26521 changed 2026-06-17Public domain