CVE-2024-51504 Apache ZooKeeper: Authentication bypass with IP-based authentication in Admin Server

Critical 9.1 Published Updated

Attackers can bypass IP-based authentication in ZooKeeper Admin Server by spoofing X-Forwarded-For headers, enabling unauthorized command execution and data access.

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

What is CVE-2024-51504?

CVE-2024-51504 is a critical authentication bypass vulnerability in Apache ZooKeeper, published on 7 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-290

Which versions are affected by CVE-2024-51504?

3 open source packages ship an affected version, including org.apache.zookeeper:zookeeper and zookeeper. It affects 1 product.

PackageAffectedFixed in
org.apache.zookeeper:zookeeper MavenFrom 3.9.03.9.3
org.apache.zookeeper:zookeeper MavenFrom 3.9.03.9.3
zookeeper BitnamiFrom 3.9.03.9.3

Products include Apache Zookeeper.

How do I fix CVE-2024-51504?

Upgrade org.apache.zookeeper:zookeeper to 3.9.3 or later.

Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.

Is CVE-2024-51504 being exploited?

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

Sources

Also known as BIT-zookeeper-2024-51504, DEBIAN-CVE-2024-51504, GHSA-g93m-8x6h-g5gv, MINI-65f5-v3qq-7f7r, OESA-2024-2600, ROOT-APP-MAVEN-CVE-2024-51504 and 1 more.

Is CVE-2024-51504 in your software?

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

Check your SBOMs for free