CVE-2021-3127: NATS Server Incorrect Access Control
Summary
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. Affects nats versions >= 2.0.0, < 2.2.0. Fixed in 2.2.0. How to fix ↓
Also tracked for
- github.com/nats-io/jwt · Go
- github.com/nats-io/jwt · Go
- github.com/nats-io/jwt/v2 · Go
- github.com/nats-io/jwt · Go
- github.com/nats-io/nats-server/v2 · Go
- golang-github-nats-io-jwt · Debian:12
The same CVE-2021-3127 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
NATS Server is a messaging system that provides a lightweight and high-performance solution for communication between distributed systems. It is widely used in cloud-native applications and microservices architectures. This vulnerability affects NATS Server version 2.x before 2.2.0 and the JWT library before 2.0.1. The vulnerability arises due to mishandling of Import Token bindings, leading to incorrect access control.
Vulnerability Detail
The vulnerability allows unauthorized access to NATS Server and JWT library. Attackers can exploit this vulnerability to bypass access controls and gain unauthorized privileges. This can result in unauthorized data access, data manipulation, or even a complete compromise of the affected system. The vulnerability is rated as high severity with a CVSS score of 8.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How To Fix
Minimum fixed version
2.2.0
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to apply the recommended fixes by upgrading NATS Server and the JWT library to the specified versions.
Conclusion
NATS Server version 2.x before 2.2.0 and JWT library before 2.0.1 are vulnerable to an incorrect access control issue. This can lead to unauthorized access and potential compromise of the affected system. It is crucial to upgrade NATS Server and the JWT library to the recommended versions to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for nats →
FAQ
NATS Server is a messaging system used for communication between distributed systems.
NATS Server 2.x before 2.2.0 and JWT library before 2.0.1 are affected.
The vulnerability allows unauthorized access and can lead to data compromise or system compromise.
Upgrade NATS Server to version 2.2.0 or later and update the JWT library to version 2.0.1 or later.
No, there is no known workaround. Applying the recommended fixes is necessary.
References
Related vulnerabilities
Recent vulnerabilities recorded for nats.