# CVE-2021-3127: nats-io/jwt not enforcing checking of Import token permissions

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.45%, higher than 74% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-03-16T19:55:10.000Z
- Modified: 2026-09-10T03:49:16.974Z
- Also known as: GHSA-62mh-w5cv-p88c, BIT-NATS-2021-3127, GHSA-9r5x-fjv3-q6h4, GHSA-j756-f273-xhp4, GO-2022-0386
- Related: CGA-3xwf-56gh-qxqq
- Weaknesses: CWE-284, CWE-755, CWE-863
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- github.com/nats-io/jwt (Go): up to 1.2.2; before 1.2.3-0.20210314221642-a826c77dc9d2
- github.com/nats-io/jwt/v2 (Go): before 2.0.1
- github.com/nats-io/nats-server/v2 (Go): before 2.2.0
- linuxfoundation nats-server: from 2.0.0 before 2.2.0
- nats jwt_library: before 2.0.1
- nats (Bitnami): from 2.0.0 before 2.2.0

## Every score

- GitHub: rating Critical
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:N`
- Bitnami Vulnerability Database: rating High

## References

- <https://advisories.nats.io/CVE/CVE-2021-3127.txt> (exploit, advisory, vendor-advisory, web)
- <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> (fix, web)
- <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, web)
- <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)

## Sources

- CVE List: [CVE-2021-3127](https://www.cve.org/CVERecord?id=CVE-2021-3127), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-62mh-w5cv-p88c](https://github.com/advisories/GHSA-62mh-w5cv-p88c), CC-BY-4.0, modified 2026-09-10
- GitHub Advisory Database: [GHSA-9r5x-fjv3-q6h4](https://github.com/advisories/GHSA-9r5x-fjv3-q6h4), CC-BY-4.0, modified 2026-09-10
- GitHub Advisory Database: [GHSA-j756-f273-xhp4](https://github.com/advisories/GHSA-j756-f273-xhp4), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2022-0386](https://pkg.go.dev/vuln/GO-2022-0386), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2021-3127](https://nvd.nist.gov/vuln/detail/CVE-2021-3127), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-NATS-2021-3127](https://osv.dev/vulnerability/BIT-NATS-2021-3127), Apache-2.0, modified 2025-04-03

---

Page: https://cve.day/CVE-2021-3127 · Whole record: https://cve.day/CVE-2021-3127.json · Rebuilt by cve.day 2026-11-25T22:58:00.308Z
