Every CVE Search/ Get API key

CVE-2020-26521

Nil dereference in NATS JWT, DoS of nats-server

7.5 HighFix available

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

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

2.16%Up 1.1 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 7.5

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

Record
CVE-2020-26521
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-476
Updated
2026-11-02
CVE List No score

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

Record
CVE-2020-26521
Updated
2026-11-02
EUVDEUVD-2022-1028 No score

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

Record
EUVD-2022-1028
Updated
2026-11-03
GitHub AdvisoriesGHSA-h2fg-54x9-5qhq 7.5

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.

Record
GHSA-h2fg-54x9-5qhq
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-476
Updated
2026-11-02
GitHub AdvisoriesGHSA-hmm9-r2m2-qg9w 7.5

Nil dereference in NATS JWT causing DoS of nats-server

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

Record
GHSA-hmm9-r2m2-qg9w
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-476
Updated
2026-11-02
OSV 7.5

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

Record
CVE-2020-26521
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 5 moreShow less
OSVDEBIAN-CVE-2020-26521 7.5

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

Record
DEBIAN-CVE-2020-26521
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVGHSA-h2fg-54x9-5qhq 7.5

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.

Record
GHSA-h2fg-54x9-5qhq
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-476
Updated
2026-11-02
OSVGHSA-hmm9-r2m2-qg9w 7.5

Nil dereference in NATS JWT causing DoS of nats-server

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

Record
GHSA-hmm9-r2m2-qg9w
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-476
Updated
2026-11-02
OSVUBUNTU-CVE-2020-26521 7.5

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

Record
UBUNTU-CVE-2020-26521
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVGO-2022-0402 No score

Panic in NATS JWT decoding in github.com/nats-io/jwt

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

Record
GO-2022-0402
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
github.com/nats-io/jwt
Go
before 1.1.0
1.1.0
github.com/nats-io/nats-server/v2
Go
before 2.1.9
2.1.9
golang-github-nats-io-jwt
Debian:12
before 2.2.0-1
2.2.0-1
golang-github-nats-io-jwt
Debian:13
before 2.2.0-1
2.2.0-1
golang-github-nats-io-jwt
Debian:14
before 2.2.0-1
2.2.0-1
golang-github-nats-io-jwt
Ubuntu:20.04:LTS
All versions, plus listed versions
0.0~git20181120.285cf2c-4
None known
golang-github-nats-io-jwt
Ubuntu:22.04:LTS
All versions, plus listed versions
0.0~git20181120.285cf2c-4.1
None known
golang-github-nats-io-jwt
Ubuntu:24.04:LTS
All versions, plus listed versions
2.4.1-12.5.2-12.5.2-2
None known
golang-github-nats-io-jwt
Ubuntu:25.10
All versions, plus listed versions
2.7.3-1
None known
golang-github-nats-io-jwt
Ubuntu:26.10
All versions, plus listed versions
2.8.0-12.8.1-12.8.2-1
None known
golang-github-nats-io-jwt
Ubuntu:26.04:LTS
All versions, plus listed versions
2.7.3-12.8.0-1
None known

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2020-26521 is a high vulnerability (CVSS 7.5) in Linuxfoundation Nats-server, published November 6, 2020. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.16%, the 82nd percentile. Fixed in github.com/nats-io/jwt 1.1.0.

References

Show 12 moreShow less
MoveEnter Open