Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTR3NXgteDUzOS1wcGY1
Incorrect handling of credential expiry by /nats-io/nats-server
Problem Description
NATS nats-server through 2020-10-07 has Incorrect Access Control because of how expired credentials are handled.
The NATS accounts system has expiration timestamps on credentials; the https://github.com/nats-io/jwt library had an API which encouraged misuse and an IsRevoked()
method which misused its own API.
A new IsClaimRevoked()
method has correct handling and the nats-server has been updated to use this. The old IsRevoked()
method now always returns true and other client code will have to be updated to avoid calling it.
The CVE identifier should cover any application using the old JWT API, where the nats-server is one of those applications.
Affected versions
JWT library
- all versions prior to 1.1.0
- fixed after nats-io/jwt PR 103 landed (2020-10-06)
NATS Server
- Version 2 prior to 2.1.9
- 2.0.0 through and including 2.1.8 are vulnerable.
- fixed with nats-io/nats-server PRs 1632, 1635, 1645
Impact
Time-based credential expiry did not work.
Workaround
Have credentials which only expire after fixes can be deployed.
Solution
Upgrade the JWT dependency in any application using it.
Upgrade the NATS server if using NATS Accounts.
Permalink: https://github.com/advisories/GHSA-4w5x-x539-ppf5JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTR3NXgteDUzOS1wcGY1
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: almost 3 years ago
Updated: 8 months ago
CVSS Score: 9.8
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Percentage: 0.00162
EPSS Percentile: 0.53522
Identifiers: GHSA-4w5x-x539-ppf5, CVE-2020-26892
References:
- https://github.com/nats-io/jwt/security/advisories/GHSA-4w5x-x539-ppf5
- https://nvd.nist.gov/vuln/detail/CVE-2020-26892
- https://github.com/nats-io/nats-server/commit/1e08b67f08e18cd844dce833a265aaa72500a12f
- https://advisories.nats.io/CVE/CVE-2020-26892.txt
- https://github.com/nats-io/nats-server/commits/master
- https://www.openwall.com/lists/oss-security/2020/11/02/2
- https://github.com/nats-io/jwt/commit/e11ce317263cef69619fc1ca743b195d02aa1d8a
- https://pkg.go.dev/vuln/GO-2022-0380
- https://lists.fedoraproject.org/archives/list/[email protected]/message/VT67XCLIIBYRT762SVFBYFFTQFVSM3SI
- https://github.com/advisories/GHSA-4w5x-x539-ppf5
Blast Radius: 43.2
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, 2.10.17, 2.10.18, 2.10.19, 2.10.20, 2.10.21, 2.10.22, 2.10.23, 2.10.24, 2.10.25
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, 2.5.4, 2.5.5, 2.5.6, 2.5.7, 2.5.8, 2.6.0, 2.7.0, 2.7.2, 2.7.3