CVE-2021-22160 Authentication with JWT allows use of “none”-algorithm

Critical 9.8 Published Updated

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.

PackageAffectedFixed in
org.apache.pulsar:pulsar MavenAll versions2.7.2
org.apache.pulsar:pulsar MavenAll versions2.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.

Sources

Also known as GHSA-3cv4-xxv7-934q.

Is CVE-2021-22160 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free