Skip to content
Fencer Vulns
high 7.5

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

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 products
    not 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

Weakness
  • CWE-863 Incorrect Authorization
  • CWE-755 Improper Handling of Exceptional Conditions

References

Sources

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.