Summary
(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
Workaround
Have credentials which only expire after fixes can be deployed.
Impact
Time-based credential expiry did not work.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Upgrade the JWT dependency in any application using it.
Upgrade the NATS server if using NATS Accounts.
Frequently Asked Questions
- What is GHSA-2C64-VJ8G-VWRQ? GHSA-2C64-VJ8G-VWRQ is a high-severity security vulnerability in github.com/nats-io/nats-server/v2 (go), affecting versions < 2.1.9. It is fixed in 2.1.9.
- Which versions of github.com/nats-io/nats-server/v2 are affected by GHSA-2C64-VJ8G-VWRQ? github.com/nats-io/nats-server/v2 (go) versions < 2.1.9 is affected.
- Is there a fix for GHSA-2C64-VJ8G-VWRQ? Yes. GHSA-2C64-VJ8G-VWRQ is fixed in 2.1.9. Upgrade to this version or later.
- Is GHSA-2C64-VJ8G-VWRQ exploitable, and should I be worried? Whether GHSA-2C64-VJ8G-VWRQ is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-2C64-VJ8G-VWRQ is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-2C64-VJ8G-VWRQ? Upgrade
github.com/nats-io/nats-server/v2to 2.1.9 or later.