CVE-2024-51504: Apache ZooKeeper Authentication Bypass Vulnerability
HIGHCVE-2024-51504 is a HIGH authentication bypass vulnerability (CWE-290: Authentication Bypass by Spoofing) affecting Apache ZooKeeper libraries in the Maven ecosystem. The issue involves authentication bypass with ip-based authentication in admin server. Remediation is available by upgrading affected packages to version 3.9.3.
CVE-2024-51504 at a Glance
How to Fix CVE-2024-51504
To remediate this vulnerability, upgrade all affected Apache ZooKeeper dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.9.3</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.zookeeper
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2024-51504, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.zookeeper
Analyze the terminal output to locate any version of Apache ZooKeeper in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.9.3), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.zookeeper command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-290: Authentication Bypass by Spoofing, where this attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. In Apache ZooKeeper, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-51504 Affected Apache ZooKeeper Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.zookeeper:zookeeper
|
Maven |
≥ 3.9.0
< 3.9.3
|
3.9.3
|
References
Frequently Asked Questions
What is CVE-2024-51504?
Which Apache ZooKeeper versions are affected?
What version fixes CVE-2024-51504?
Is zookeeper affected?
What CWE is associated with CVE-2024-51504?
How can I check Maven dependencies for CVE-2024-51504?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g93m-8x6h-g5gv",
"modified" : "2025-06-30T18:49:25Z",
"published" : "2024-11-07T12:30:35Z",
"aliases" : [ "CVE-2024-51504" ],
"summary" : "Apache ZooKeeper: Authentication bypass with IP-based authentication in Admin Server",
"details" : "When using IPAuthenticationProvider in ZooKeeper Admin Server there is a possibility of Authentication Bypass by Spoofing -- this only impacts IP based authentication implemented in ZooKeeper Admin Server. Default configuration of client's IP address detection in IPAuthenticationProvider, which uses HTTP request headers, is weak and allows an attacker to bypass authentication via spoofing client's IP address in request headers. Default configuration honors X-Forwarded-For HTTP header to read client's IP address. X-Forwarded-For request header is mainly used by proxy servers to identify the client and can be easily spoofed by an attacker pretending that the request comes from a different IP address. Admin Server commands, such as snapshot and restore arbitrarily can be executed on successful exploitation which could potentially lead to information leakage or service availability issues. Users are recommended to upgrade to version 3.9.3, which fixes this issue.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.zookeeper:zookeeper"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.9.0"
}, {
"fixed" : "3.9.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-51504"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/zookeeper/commit/2c2b74c1c11b6531aabb1bf06782e859048d5983"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/zookeeper"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/b3qrmpkto5r6989qr61fw9y2x646kqlh"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2024/11/06/5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-290" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-30T18:49:25Z",
"nvd_published_at" : "2024-11-07T10:15:08Z"
}
}