CVE-2021-3127
Linux Debian vulnerability analysis and mitigation

Overview

NATS Server 2.x before 2.2.0 and JWT library before 2.0.1 contain an Incorrect Access Control vulnerability (CVE-2021-3127) due to mishandling of Import Token bindings. The vulnerability was discovered and disclosed on March 16, 2021. The issue affects the NATS.io distributed communication technology system, specifically impacting the server component and JWT library used for handling JWTs across NATS.io projects (NATS Advisory).

Technical details

The vulnerability stems from the JWT library's incorrect validation of bindings in the Import Token, where it only warned on mismatches instead of rejecting the token outright. The CVSS v3.1 base score is 7.5 (High), with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N. The vulnerability allows network-based attacks with low attack complexity, requires no privileges or user interaction, and can result in high confidentiality impact (AttackerKB).

Impact

The vulnerability allows any account to take an Import token used by other accounts and re-use it to import any Subject from the Exporting account, not just the Subject referenced in the Import Token. Since the NATS account-server system treats account JWTs as semi-public information, attackers can easily enumerate all account JWTs and retrieve all Import Tokens, potentially accessing any Subject from accounts that provide Exported Subjects (NATS Advisory).

Mitigation and workarounds

The primary mitigation is to upgrade the JWT library to version 2.0.1 or later, and NATS server to version 2.2.0 or later. As a temporary workaround, administrators can deny access to clients to update their account JWT in the account server. Additionally, it's recommended to audit all accounts JWTs to scan for exploit attempts using the provided Python script jwt-audit.py (NATS Advisory).

Additional resources


SourceThis report was generated using AI

Related Linux Debian vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-61729HIGH7.5
  • DockerDocker
  • golang-1.19
NoYesDec 02, 2025
CVE-2025-64460HIGH7.5
  • Linux DebianLinux Debian
  • python-django
NoYesDec 02, 2025
CVE-2025-65187MEDIUM6.1
  • Linux DebianLinux Debian
  • civicrm
NoNoDec 02, 2025
CVE-2025-65105MEDIUM4.5
  • Linux DebianLinux Debian
  • github.com/apptainer/apptainer
NoYesDec 02, 2025
CVE-2025-13372MEDIUM4.3
  • Linux DebianLinux Debian
  • py3-django
NoYesDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management