GHSA-2C64-VJ8G-VWRQ
Vulnerability from github – Published: 2021-05-21 16:11 – Updated: 2025-10-03 19:21(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.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/nats-io/nats-server/v2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.1.9"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-284"
],
"github_reviewed": true,
"github_reviewed_at": "2021-05-20T22:19:22Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "(This advisory is canonically https://advisories.nats.io/CVE/CVE-2020-26892.txt )\n\n## Problem Description\n\nNATS nats-server through 2020-10-07 has Incorrect Access Control because of how expired credentials are handled.\n\nThe NATS accounts system has expiration timestamps on credentials; the \u003chttps://github.com/nats-io/jwt\u003e library had an API which encouraged misuse and an `IsRevoked()` method which misused its own API.\n\nA 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.\n\nThe CVE identifier should cover any application using the old JWT API, where the nats-server is one of those applications.\n\n\n## Affected versions\n\n#### JWT library\n\n * all versions prior to 1.1.0\n * fixed after nats-io/jwt PR 103 landed (2020-10-06)\n\n#### NATS Server\n\n * Version 2 prior to 2.1.9\n + 2.0.0 through and including 2.1.8 are vulnerable.\n * fixed with nats-io/nats-server PRs 1632, 1635, 1645\n\n\n## Impact\n\nTime-based credential expiry did not work.\n\n\n## Workaround\n\nHave credentials which only expire after fixes can be deployed.\n\n\n## Solution\n\nUpgrade the JWT dependency in any application using it.\n\nUpgrade the NATS server if using NATS Accounts.",
"id": "GHSA-2c64-vj8g-vwrq",
"modified": "2025-10-03T19:21:51Z",
"published": "2021-05-21T16:11:49Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/nats-io/nats-server/security/advisories/GHSA-2c64-vj8g-vwrq"
},
{
"type": "WEB",
"url": "https://github.com/nats-io/jwt/commit/e11ce317263cef69619fc1ca743b195d02aa1d8a"
},
{
"type": "WEB",
"url": "https://advisories.nats.io/CVE/CVE-2020-26892.txt"
},
{
"type": "PACKAGE",
"url": "https://github.com/nats-io/nats-server"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Incorrect handling of credential expiry by /nats-io/nats-server"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.