CVE-2021-3127 json
nats-io/jwt not enforcing checking of Import token permissions
published 2021-03-16 5 y ago modified 2026-09-10 1 mo ago also BIT-nats-2021-3127 , EUVD-2022-0850 , GHSA-62mh-w5cv-p88c , GHSA-9r5x-fjv3-q6h4 , GHSA-j756-f273-xhp4 , GO-2022-0386
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 73%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- go github.com/nats-io/jwt 1.2.3-0.20210314221642-a826c77dc9d2
- go github.com/nats-io/jwt/v2 2.0.1
- go github.com/nats-io/nats-server/v2 2.2.0
- bitnami nats 2.2.0
- linuxfoundation nats-server 2.2.0
- nats jwt_library 2.0.1
- golang-github-nats-io-jwt Debian 14, Debian 13, Debian 12 2.2.0-1
debian advisories DEBIAN-CVE-2021-3127
- github.com/nats-io/jwt@6c72fdd commit
- github.com/nats-io/nats-server@423b794 commit
- github.com/nats-io/jwt#149 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-3127 updated cvss 7.5
nats-server: mishandling Import Token bindings may lead to Incorrect Access Control
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.45% chance of exploitation in the next 30 days, higher than 73% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- advisories.nats.io https://advisories.nats.io/CVE/CVE-2021-3127.txt referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/nats-io/jwt | <=1.2.2 <1.2.3-0.20210314221642-a826c77dc9d2 |
1.2.3-0.20210314221642-a826c77dc9d2 |
| go | github.com/nats-io/jwt/v2 | <2.0.1 |
2.0.1 |
| go | github.com/nats-io/nats-server/v2 | <2.2.0 |
2.2.0 |
| bitnami | nats | >=2.0.0, <2.2.0 |
2.2.0 |
Classification
References
-
github.com
/nats-io/jwt/pull/149
web, patch
-
github.com
/nats-io/jwt/commit/6c72fdd73e82fa9ebb151d84773baf4e9164c4ab
web
-
github.com
/nats-io/nats-server/commit/423b79440c80c863de9f4e20548504e6c5d5e403
web
-
advisories.nats.io
/CVE/CVE-2021-3127.txt
web, exploit, vendor-advisory, advisory
-
github.com
/nats-io/jwt/security/advisories/GHSA-62mh-w5cv-p88c
web
-
github.com
/nats-io/nats-server/security/advisories/GHSA-j756-f273-xhp4
web
-
github.com
/nats-io/jwt
package
-
nvd.nist.gov
/vuln/detail/CVE-2021-3127
advisory, web
-
github.com
/nats-io/nats-server
package
Sources
- CVE List CVE-2021-3127
- GitHub Advisory GHSA-62mh-w5cv-p88c
- GitHub Advisory GHSA-9r5x-fjv3-q6h4
- GitHub Advisory GHSA-j756-f273-xhp4
- NVD CVE-2021-3127
- OSV BIT-nats-2021-3127
- OSV GO-2022-0386
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.