CVE-2021-41571 Pulsar Admin API allows access to data from other tenants using getMessageById API

Medium 6.5 Published Updated

Authenticated users can read data from other tenants via the Admin API due to insufficient validation of ledger IDs against topic permissions.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-41571?

CVE-2021-41571 is a medium-severity missing authorization vulnerability in Apache Pulsar, published on 1 Feb 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

In Apache Pulsar it is possible to access data from BookKeeper that does not belong to the topics accessible by the authenticated user. The Admin API get-message-by-id requires the user to input a topic and a ledger id. The ledger id is a pointer to the data, and it is supposed to be a valid it for the topic. Authorisation controls are performed against the topic name and there is not proper validation the that ledger id is valid in the context of such ledger. So it may happen that the user is able to read from a ledger that contains data owned by another tenant. This issue affects Apache Pulsar Apache Pulsar version 2.8.0 and prior versions; Apache Pulsar version 2.7.3 and prior versions; Apache Pulsar version 2.6.4 and prior versions.

Weakness: CWE-863

Which versions are affected by CVE-2021-41571?

6 open source packages ship an affected version, including org.apache.pulsar:pulsar. It affects 1 product.

PackageAffectedFixed in
org.apache.pulsar:pulsar MavenAll versions to 2.6.4None
org.apache.pulsar:pulsar MavenAll versions to 2.6.4None
org.apache.pulsar:pulsar MavenFrom 2.7.02.7.4
org.apache.pulsar:pulsar MavenFrom 2.7.02.7.4
org.apache.pulsar:pulsar MavenFrom 2.8.02.8.1
org.apache.pulsar:pulsar MavenFrom 2.8.02.8.1

Products include Apache Pulsar.

How do I fix CVE-2021-41571?

Upgrade org.apache.pulsar:pulsar to a fixed version for your release line: 2.7.4 or 2.8.1.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2021-41571 being exploited?

There is no known exploitation of CVE-2021-41571 in the wild and no public exploit code.

Sources

Also known as GHSA-3whx-qrj5-hh2h.

Is CVE-2021-41571 in your software?

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

Check your SBOMs for free