CVE-2021-22160 Authentication with JWT allows use of “none”-algorithm
Attackers can bypass authentication and gain admin access by using JWTs with the 'none' algorithm in Apache Pulsar instances configured for token-based auth.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-22160?
CVE-2021-22160 is a critical authentication bypass vulnerability in Apache Pulsar, published on 26 May 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
If Apache Pulsar is configured to authenticate clients using tokens based on JSON Web Tokens (JWT), the signature of the token is not validated if the algorithm of the presented token is set to "none". This allows an attacker to connect to Pulsar instances as any user (incl. admins).
Weakness: CWE-347
Which versions are affected by CVE-2021-22160?
2 open source packages ship an affected version, including org.apache.pulsar:pulsar. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.pulsar:pulsar Maven | All versions | 2.7.2 |
org.apache.pulsar:pulsar Maven | All versions | 2.7.2 |
Products include Apache Pulsar.
How do I fix CVE-2021-22160?
Upgrade org.apache.pulsar:pulsar to 2.7.2 or later.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2021-22160 being exploited?
There is no known exploitation of CVE-2021-22160 in the wild and no public exploit code.
Other vulnerabilities in Apache Pulsar
- CVE-2023-30429 Apache Pulsar: Incorrect Authorization for Function Worker when using mTLS Authentication through Pulsar Proxy
- CVE-2024-27135 Apache Pulsar: Improper Input Validation in Pulsar Function Worker allows Remote Code Execution
- CVE-2024-27894 Apache Pulsar: Pulsar Functions Worker Allows Unauthorized File Access and Unauthorized HTTP/HTTPS Proxying
- CVE-2024-27317 Apache Pulsar: Pulsar Functions Worker's Archive Extraction Vulnerability Allows Unauthorized File Modification
- CVE-2022-34321 Apache Pulsar: Improper Authentication for Pulsar Proxy Statistics Endpoint
Sources
Also known as GHSA-3cv4-xxv7-934q.