Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTJjNjQtdmo4Zy12d3Jx
Incorrect handling of credential expiry by /nats-io/nats-server
(This advisory is canonically https://advisories.nats.io/CVE/CVE-2020-26892.txt )
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-2c64-vj8g-vwrqJSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTJjNjQtdmo4Zy12d3Jx
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: over 3 years ago
Updated: about 1 year ago
Identifiers: GHSA-2c64-vj8g-vwrq
References:
- https://github.com/nats-io/nats-server/security/advisories/GHSA-2c64-vj8g-vwrq
- https://github.com/nats-io/jwt/commit/e11ce317263cef69619fc1ca743b195d02aa1d8a
- https://advisories.nats.io/CVE/CVE-2020-26892.txt
- https://github.com/advisories/GHSA-2c64-vj8g-vwrq
Blast Radius: 0.0
Affected Packages
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
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