VYPR
Critical severityNVD Advisory· Published May 26, 2021· Updated Aug 3, 2024

Authentication with JWT allows use of “none”-algorithm

CVE-2021-22160

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

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Apache Pulsar JWT authentication tokens accepted with algorithm 'none', allowing remote impersonation of any user.

Vulnerability

CVE-2021-22160 affects Apache Pulsar instances that use JWT-based token authentication. The JWT library did not validate the signature when the token's algorithm header was set to 'none'. This is a known weakness in JWT implementations where the library trusts the algorithm indicated in the token itself. Versions prior to 2.7.2 are affected. [1][2]

Exploitation

An attacker with network access to a Pulsar broker can craft a JWT token with the algorithm set to 'none', a blank signature, and any desired claims (e.g., user or admin role). No prior authentication or valid credentials are required. The broker's authentication check will accept the forged token as valid, granting the attacker the privileges associated with the forged identity. [1]

Impact

Successful exploitation allows an attacker to connect to Pulsar as any user, including administrative accounts. This can lead to full compromise of the Pulsar instance: unauthorized access to topics, reading or writing messages, and modifying cluster configuration. The attack completely bypasses the intended authentication mechanism. [1]

Mitigation

The fix was released in Apache Pulsar version 2.7.2 on 2021-05-26. Users should upgrade to this version or later. [2] The fix enforces that the JWT signature algorithm must be validated against the expected key. No workaround is available for older versions; upgrading is the only recommended mitigation.

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.apache.pulsar:pulsarMaven
< 2.7.22.7.2

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

20

News mentions

0

No linked articles in our index yet.