CVE-2022-33681 Improper Hostname Verification in Java Client and Proxy can expose authentication data via MITM

Medium 5.9 Published Updated

Delayed TLS hostname verification in Apache Pulsar Java Client allows MITM attackers to intercept authentication data, potentially leading to account takeover.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-33681?

CVE-2022-33681 is a medium-severity vulnerability in Apache Pulsar, published on 23 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Delayed TLS hostname verification in the Pulsar Java Client and the Pulsar Proxy make each client vulnerable to a man in the middle attack. Connections from the Pulsar Java Client to the Pulsar Broker/Proxy and connections from the Pulsar Proxy to the Pulsar Broker are vulnerable. Authentication data is sent before verifying the server’s TLS certificate matches the hostname, which means authentication data could be exposed to an attacker. 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 by providing the client with a cryptographically valid certificate for an unrelated host. Because the client sends authentication data before performing hostname verification, an attacker could gain access to the client’s authentication data. The client eventually closes the connection when it verifies the hostname and identifies the targeted hostname does not match a hostname on the certificate. Because the client eventually closes the connection, the value of the intercepted authentication data depends on the authentication method used by the client. Token based authentication and username/password authentication methods are vulnerable because the authentication data can be used to impersonate the client in a separate session. This issue affects Apache Pulsar Java 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; 2.6.4 and earlier.

Weakness: CWE-295

Which versions are affected by CVE-2022-33681?

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

PackageAffectedFixed in
org.apache.pulsar:pulsar-client MavenAll versions2.7.5
org.apache.pulsar:pulsar-client MavenAll versions2.7.5
org.apache.pulsar:pulsar-client MavenFrom 2.10.02.10.1
org.apache.pulsar:pulsar-client MavenFrom 2.10.02.10.1
org.apache.pulsar:pulsar-client MavenFrom 2.8.02.8.4
org.apache.pulsar:pulsar-client MavenFrom 2.8.02.8.4
2 more packages
org.apache.pulsar:pulsar-client MavenFrom 2.9.02.9.3
org.apache.pulsar:pulsar-client MavenFrom 2.9.02.9.3

Products include Apache Pulsar.

How do I fix CVE-2022-33681?

Upgrade org.apache.pulsar:pulsar-client to a fixed version for your release line: 2.7.5, 2.10.1, 2.8.4 or 2.9.3.

Is CVE-2022-33681 being exploited?

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

Sources

Also known as GHSA-c5fp-x2h5-vjv7.

Is CVE-2022-33681 in your software?

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

Check your SBOMs for free