Apache ZooKeeper: Reverse-DNS fallback enables hostname verification bypass in ZooKeeper ZKTrustManager
Apache ZooKeeper's hostname verification can be bypassed by attackers who control DNS reverse records (PTR), allowing them to impersonate legitimate servers even with a valid certificate. This matters because it weakens the security of ZooKeeper clusters that rely on certificate-based authentication.
CWE-295 (Improper Certificate Validation) and CWE-350 (Reliance on Reverse DNS Resolution for Security): ZKTrustManager falls back to reverse DNS lookup when Subject Alternative Name (SAN) validation fails, enabling hostname verification bypass. Attackers with PTR record control can present a valid certificate for the reverse-resolved name to impersonate ZooKeeper nodes; however, the certificate must be trusted by the ZKTrustManager, raising the attack complexity.
Want to know if your infrastructure is exposed to this?
Talk to TrueHacking →