Skip to content
Crypto Disclosed report Intermediate CVE-2022-33684

Apache Pulsar Disabled Certificate Validation for OAuth Client Credential Requests makes C++/Python Clients vulnerable to MITM attack

The Apache Pulsar C++ and Python clients did not verify TLS certificates when requesting OAuth2 client credentials, even when insecure connections were disabled. An attacker positioned between the client and the OAuth2 server could intercept or modify the request and steal credentials to authenticate to a Pulsar cluster.

apache/pulsar

Originally disclosed on huntr

The Apache Pulsar C++ Client does not verify peer TLS certificates when making HTTPS calls for the OAuth2.0 Client Credential Flow, even when tlsAllowInsecureConnection is disabled via configuration. This vulnerability allows an attacker to perform a man in the middle attack and intercept and/or modify the GET request that is sent to the ClientCredentialFlow "issuer url". The intercepted credentials can be used to acquire authentication data from the OAuth2.0 server to then authenticate with an Apache Pulsar cluster. An attacker can only take advantage of this vulnerability by taking control of a machine "between" the client and the server. The attacker must then actively manipulate traffic to perform the attack. The Apache Pulsar Python Client wraps the C++ client, so it is also vulnerable in the same way.

This issue affects Apache Pulsar C++ Client and Python Client versions 2.7.0 to 2.7.4; 2.8.0 to 2.8.3; 2.9.0 to 2.9.2; 2.10.0 to 2.10.1; 2.6.4 and earlier.

Any users running affected versions of the C++ Client or the Python Client should rotate vulnerable OAuth2.0 credentials, including client_id and client_secret.

  • 2.7 C++ and Python Client users should upgrade to 2.7.5 and rotate vulnerable OAuth2.0 credentials.
  • 2.8 C++ and Python Client users should upgrade to 2.8.4 and rotate vulnerable OAuth2.0 credentials.
  • 2.9 C++ and Python Client users should upgrade to 2.9.3 and rotate vulnerable OAuth2.0 credentials.
  • 2.10 C++ and Python Client users should upgrade to 2.10.2 and rotate vulnerable OAuth2.0 credentials. 3.0 C++ users are unaffected and 3.0 Python Client users will be unaffected when it is released.
  • Any users running the C++ and Python Client for 2.6 or less should upgrade to one of the above patched versions.

From the GitHub Advisory Database (GHSA-5r3h-c3r7-9w4h, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the C++ client's HTTP library was configured to skip certificate verification for the OAuth2 token request regardless of the tlsAllowInsecureConnection setting.

Impact

An attacker who controls a machine between the client and the OAuth2 server could intercept or modify the credential request and use the stolen credentials to authenticate to a Pulsar cluster.

What the attacker needed

Attacker controls a machine between client and server; client uses OAuth2 client credential flow

The fix

The issue was fixed in patched client versions, and users should upgrade and rotate their OAuth2 credentials.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a program connects to a server over HTTPS, it should check that the server's certificate is genuine, like checking a passport. Here the client skipped that check, so someone sitting on the network path could pretend to be the server, read the login details, and later use them to access the Pulsar system.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.