logo

CVE-2020-26892 github.com/nats-io/nats-server/v2

Package

Manager: go
Name: github.com/nats-io/nats-server/v2
Vulnerable Version: >=0 <2.1.9

Severity

Level: Critical

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

EPSS: 0.00558 pctl0.67212

Details

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.

Metadata

Created: 2022-02-11T23:42:20Z
Modified: 2024-05-20T21:19:19Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/02/GHSA-4w5x-x539-ppf5/GHSA-4w5x-x539-ppf5.json
CWE IDs: ["CWE-798"]
Alternative ID: GHSA-4w5x-x539-ppf5
Finding: F009
Auto approve: 1