CVE-2021-3127
HIGH 7.5CVSS 3.1nats-io/jwt not enforcing checking of Import token permissions
NATS Server 2.x before 2.2.0 and JWT library before 2.0.1 have Incorrect Access Control because Import Token bindings are mishandled.
- Published
- 16 Mar 2021
- Last modified
- 10 Sep 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-284CWE-755CWE-863
- Also known as
- BIT-nats-2021-3127GHSA-62mh-w5cv-p88cGHSA-9r5x-fjv3-q6h4GHSA-j756-f273-xhp4GO-2022-0386
- Sources
- NVDJSONOSV GHSA-62mh-w5cv-p88cJSONOSV GHSA-9r5x-fjv3-q6h4JSONOSV GHSA-j756-f273-xhp4JSONOSV GO-2022-0386JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | linuxfoundation | nats-servercpe:2.3:a:linuxfoundation:nats-server:*:*:*:*:*:*:*:* |
>= 2.0.0, < 2.2.0 | 2.2.0 |
| NVD | nats | jwt_librarycpe:2.3:a:nats:jwt_library:*:*:*:*:*:*:*:* |
< 2.0.1 | 2.0.1 |
| OSV | Go | github.com/nats-io/jwt | <= 1.2.2 | |
| OSV | Go | github.com/nats-io/jwt/v2 | < 2.0.1 | 2.0.1 |
| OSV | Go | github.com/nats-io/nats-server/v2 | < 2.2.0 | 2.2.0 |
| OSV | Go | github.com/nats-io/jwt | < 1.2.3-0.20210314221642-a826c77dc9d2 | 1.2.3-0.20210314221642-a826c77dc9d2 |
References
- https://advisories.nats.io/CVE/CVE-2021-3127.txt · Exploit, Vendor Advisory, WEB, ADVISORY
- https://github.com/nats-io/jwt/security/advisories/GHSA-62mh-w5cv-p88c · WEB
- https://github.com/nats-io/nats-server/security/advisories/GHSA-j756-f273-xhp4 · WEB
- https://github.com/nats-io/jwt/pull/149 · WEB, FIX
- https://github.com/nats-io/jwt/commit/6c72fdd73e82fa9ebb151d84773baf4e9164c4ab · WEB
- https://github.com/nats-io/jwt · PACKAGE
- https://nvd.nist.gov/vuln/detail/CVE-2021-3127 · ADVISORY
- https://github.com/nats-io/jwt/pull/149/commits/a826c77dc9d2671c961b75ceefdb439c41029866 · WEB
- https://github.com/nats-io/nats-server/commit/423b79440c80c863de9f4e20548504e6c5d5e403 · WEB
- https://github.com/nats-io/nats-server · PACKAGE
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 16 Mar 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 1 Jul 2022)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 21 May 2021)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 15 Feb 2022)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 15 Feb 2022)