{"id":"CVE-2020-26892","aliases":["CVE-2020-26892","GHSA-2c64-vj8g-vwrq","GHSA-4w5x-x539-ppf5","GO-2022-0380"],"related":["CGA-6373-c5g9-cgvf"],"kind":"vulnerability","state":"published","title":"Incorrect handling of credential expiry by /nats-io/nats-server","summary":"The JWT library in NATS nats-server before 2.1.9 has Incorrect Access Control because of how expired credentials are handled.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The JWT library in NATS nats-server before 2.1.9 has Incorrect Access Control because of how expired credentials are handled.","source":"cvelist"},{"lang":"en","text":"(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 <https://github.com/nats-io/jwt> 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"## 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 <https://github.com/nats-io/jwt> 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"The AccountClaims.IsRevoked and Export.IsRevoked functions improperly validate expired credentials using the current system time rather than the issue time of the JWT to be tested.\n\nThese functions cannot be used properly. Newer versions of the jwt package provide an IsClaimRevoked method which performs correct validation. In these versions, the IsRevoked method always return true.","format":"markdown","source":"go"},{"lang":"es","text":"La biblioteca JWT en NATS nats-server versiones anteriores a 2.1.9, presenta un Control de Acceso Incorrecto debido a cómo son manejaban las credenciales expiradas","source":"nvd"}],"published":"2020-11-06T07:36:45.000Z","modified":"2026-09-10T03:49:11.546Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-284","CWE-798"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.1.9"}],"ecosystem":"Go","package":"github.com/nats-io/nats-server/v2","purl":"pkg:golang/github.com/nats-io/nats-server/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.1.0"}],"ecosystem":"Go","package":"github.com/nats-io/jwt","purl":"pkg:golang/github.com/nats-io/jwt","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.1.0"}],"ecosystem":"Go","package":"github.com/nats-io/jwt","purl":"pkg:golang/github.com/nats-io/jwt","source":"go"},{"ranges":[{"status":"affected","fixed":"2.1.9"}],"vendor":"linuxfoundation","product":"nats-server","cpe":"cpe:2.3:a:linuxfoundation:nats-server:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"33"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nats-io/nats-server/commits/master","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.openwall.com/lists/oss-security/2020/11/02/2","tags":["mailing-list","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VT67XCLIIBYRT762SVFBYFFTQFVSM3SI/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/nats-io/nats-server/security/advisories/GHSA-2c64-vj8g-vwrq","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nats-io/jwt/commit/e11ce317263cef69619fc1ca743b195d02aa1d8a","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://advisories.nats.io/CVE/CVE-2020-26892.txt","tags":["advisory","web"],"sources":["ghsa","go"]},{"url":"https://github.com/nats-io/nats-server","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/nats-io/jwt/security/advisories/GHSA-4w5x-x539-ppf5","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26892","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nats-io/nats-server/commit/1e08b67f08e18cd844dce833a265aaa72500a12f","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nats-io/jwt","tags":["package"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VT67XCLIIBYRT762SVFBYFFTQFVSM3SI","tags":["web"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0380","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-26892","url":"https://www.cve.org/CVERecord?id=CVE-2020-26892","licence":"CVE Terms of Use","modified":"2024-08-04T16:03:22.745Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2c64-vj8g-vwrq","url":"https://github.com/advisories/GHSA-2c64-vj8g-vwrq","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:04.052Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4w5x-x539-ppf5","url":"https://github.com/advisories/GHSA-4w5x-x539-ppf5","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:11.546Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0380","url":"https://pkg.go.dev/vuln/GO-2022-0380","licence":"CC-BY-4.0","modified":"2026-02-04T04:14:02.578Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-26892","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26892","licence":"Public domain","modified":"2026-06-17T03:08:28.643Z"}],"updatedAt":"2026-11-25T22:57:55.620Z","epss":{"score":0.02328,"percentile":0.83986,"date":"2026-12-01T12:00:22.000Z"}}