Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWgyZmctNTR4OS01cWhx
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.
Permalink: https://github.com/advisories/GHSA-h2fg-54x9-5qhqJSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWgyZmctNTR4OS01cWhx
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: over 2 years ago
Updated: over 1 year ago
CVSS Score: 7.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Identifiers: GHSA-h2fg-54x9-5qhq, CVE-2020-26521
References:
- https://github.com/nats-io/jwt/security/advisories/GHSA-h2fg-54x9-5qhq
- https://nvd.nist.gov/vuln/detail/CVE-2020-26521
- https://github.com/nats-io/nats-server/commit/9ff8bcde2e46009e98bd9e88f598af355f62c168
- https://advisories.nats.io/CVE/CVE-2020-26521.txt
- https://github.com/nats-io/nats-server/commits/master
- https://lists.fedoraproject.org/archives/list/[email protected]/message/VT67XCLIIBYRT762SVFBYFFTQFVSM3SI/
- http://www.openwall.com/lists/oss-security/2020/11/02/2
- https://github.com/nats-io/jwt/pull/107
- https://pkg.go.dev/vuln/GO-2022-0402
- https://github.com/advisories/GHSA-h2fg-54x9-5qhq
Blast Radius: 33.1
Affected Packages
go:github.com/nats-io/nats-server/v2
Dependent packages: 6,417Dependent repositories: 24,884
Downloads:
Affected Version Ranges: < 2.1.9
Fixed in: 2.1.9
All affected versions: 2.0.0, 2.0.2, 2.0.4, 2.1.0, 2.1.2, 2.1.4, 2.1.6, 2.1.7, 2.1.8
All unaffected versions: 2.1.9, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.5.0, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.6.6, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.9.4, 2.9.5, 2.9.6, 2.9.7, 2.9.8, 2.9.9, 2.9.10, 2.9.11, 2.9.12, 2.9.14, 2.9.15, 2.9.16, 2.9.17, 2.9.18, 2.9.19, 2.9.20, 2.9.21, 2.9.22, 2.9.23, 2.9.24, 2.9.25, 2.10.0, 2.10.1, 2.10.2, 2.10.3, 2.10.4, 2.10.5, 2.10.6, 2.10.7, 2.10.8, 2.10.9, 2.10.10, 2.10.11, 2.10.12, 2.10.14, 2.10.15, 2.10.16
go:github.com/nats-io/jwt
Dependent packages: 543Dependent repositories: 25,517
Downloads:
Affected Version Ranges: < 1.1.0
Fixed in: 1.1.0
All affected versions: 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.8, 0.1.0, 0.2.0, 0.2.2, 0.2.4, 0.2.6, 0.2.8, 0.2.10, 0.2.12, 0.2.14, 0.2.16, 0.3.0, 0.3.2, 1.0.0, 1.0.1
All unaffected versions: 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.2.2, 2.4.0, 2.4.1, 2.5.0, 2.5.2, 2.5.3