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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.9
- **CVSS:** 5.9 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.60% (percentile 43, 2026-11-26)
- **CWE:** CWE-295
- **Aliases:** GHSA-c5fp-x2h5-vjv7
- **Published:** 2022-09-23T09:25:13.000Z
- **Modified:** 2026-06-17T04:49:14.643Z

## Who should check

- Projects that depend on Maven package org.apache.pulsar:pulsar-client (\< 2.7.5)
- Anyone running Apache Software Foundation Apache Pulsar 2.10.0; \>= 2.7, \<= 2.7.4; \>= 2.8, \<= 2.8.3; \>= 2.9, \<= 2.9.2; \>= 2.6 and earlier, \<= 2.6.4

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

## Affected and fixed versions

- Maven `org.apache.pulsar:pulsar-client`: affected \< 2.7.5; fixed 2.7.5, 2.8.4, 2.9.3, 2.10.1 (osv)
- Apache Software Foundation Apache Pulsar: 2.10.0; \>= 2.7, \<= 2.7.4; \>= 2.8, \<= 2.8.3; \>= 2.9, \<= 2.9.2; \>= 2.6 and earlier, \<= 2.6.4 (cvelist)

## Mitigation

- Upgrade org.apache.pulsar:pulsar-client to one of 2.7.5, 2.8.4, 2.9.3, 2.10.1 (or later in the same release line).
- Vendor workaround: Any users running affected versions of the Java Client should rotate vulnerable authentication data, including tokens and passwords.
- 
- 2.7 Pulsar Java Client users should upgrade to 2.7.5, and rotate vulnerable authentication data, including tokens and passwords.
- 2.8 Pulsar Java Client users should upgrade to 2.8.4, and rotate vulnerable authentication data, including tokens and passwords.
- 2.9 Pulsar Java Client users should upgrade to 2.9.3, and rotate vulnerable authentication data, including tokens and passwords.
- 2.10 Pulsar Java Client users should upgrade to 2.10.1, and rotate vulnerable authentication data, including tokens and passwords.
- Any users running the Pulsar Java Client for 2.6.4 and earlier should upgrade to one of the above patched versions, and rotate vulnerable authentication data, including tokens and passwords.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-33681. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-33681.md
Affected: org.apache.pulsar:pulsar-client < 2.7.5
Fixed in: 2.7.5, 2.8.4, 2.9.3, 2.10.1

Steps:
1. Search this machine and project for org.apache.pulsar:pulsar-client (Maven), Apache Software Foundation Apache Pulsar: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-33681 being exploited?

There is no confirmed exploitation: CVE-2022-33681 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.60% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-33681?

Medium: CVSS 5.9 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2022-33681?

org.apache.pulsar:pulsar-client \< 2.7.5.

### Is there a fix for CVE-2022-33681?

Yes. Fixed in 2.7.5, 2.8.4, 2.9.3, 2.10.1. Upgrade org.apache.pulsar:pulsar-client to one of 2.7.5, 2.8.4, 2.9.3, 2.10.1 (or later in the same release line). Vendor workaround: Any users running affected versions of the Java Client should rotate vulnerable authentication data, including tokens and passwords.  2.7 Pulsar Java Client users should upgrade to 2.7.5, and rotate vulnerable authentication data, including tokens and passwords. 2.8 Pulsar Java Client users should upgrade to 2.8.4, and rotate vulnerable authentication data, including tokens and passwords. 2.9 Pulsar Java Client users should upgrade to 2.9.3, and rotate vulnerable authentication data, including tokens and passwords. 2.10 Pulsar Java Client users should upgrade to 2.10.1, and rotate vulnerable authentication data, including tokens and passwords. Any users running the Pulsar Java Client for 2.6.4 and earlier should upgrade to one of the above patched versions, and rotate vulnerable authentication data, including tokens and passwords.

### How do I check if I'm affected by CVE-2022-33681?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://lists.apache.org/thread/fpo6x10trvn20hlk0dmnr5vlz5v4kl3d>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2022-33681>
- other: <https://github.com/apache/pulsar/tree/db26073728bf86fc80deecaece2dc02b50bbb9b5/pulsar-client>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-33681>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-c5fp-x2h5-vjv7> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2022-33681> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-33681>
