vulnerable service
vulnerable target environmentbuild and test container
A single service built from Dockerfile.vulnerable. It clones Apache Ranger 2.7.0, builds the vulnerable NiFi plugin modules, compiles standalone vulnerable/fixed hostname verifier Java classes, and includes a certificate generation script. It runs a simple HTTP server on port 8080 (mapped to host port 20880) and keeps the container alive with 'tail -f /dev/null'.
CVE-2025-59060/docker-compose.yml:10-24CVE-2025-59060/Dockerfile.vulnerable:1-101VulnerableHostnameVerifier.java
vulnerable code samplestandalone test class
A standalone Java class extracted from Apache Ranger 2.7.0's NiFiRegistryClient.java. It implements a HostnameVerifier that iterates over all certificates in the peer chain and returns true if any SAN matches the hostname, demonstrating the vulnerability.
CVE-2025-59060/standalone/VulnerableHostnameVerifier.java:1-66FixedHostnameVerifier.java
fixed code samplestandalone test class
A standalone Java class representing the fixed verifier from Apache Ranger 2.8.0. It only checks the leaf certificate (certificates[0]) for hostname matching, as per the TLS specification.
CVE-2025-59060/standalone/FixedHostnameVerifier.java:1-64HostnameVerifierTest.java
standalone Java test harness
A Java test class that loads or generates a crafted certificate chain, creates a mock SSLSession, and tests both the vulnerable and fixed verifiers. It outputs a summary confirming the vulnerability when the vulnerable verifier accepts and the fixed verifier rejects.
CVE-2025-59060/standalone/HostnameVerifierTest.java:1-317generate_certs.sh
certificate generation script
A bash script that generates a TLS certificate chain exploiting the vulnerability: a leaf cert with SAN=attacker.com, an intermediate CA cert with SAN=nifi-registry.target.com, and a root CA. It also creates PKCS12 keystores and displays the attack scenario.
CVE-2025-59060/scripts/generate_certs.sh:1-117poc.py
PoC script (Vector 1)
A Python script that starts a rogue TLS server inside the container, connects remotely over the Docker network, retrieves the certificate chain, and demonstrates the hostname verification bypass using a Python port of the vulnerable Java logic. It also runs the actual Java verifier for confirmation.
CVE-2025-59060/poc/poc.py:1-521poc_vector2.py
PoC script (Vector 2)
A Python script that deploys a Java test class inside the container, starts a rogue TLS server, and has the Java client connect over a real TLS socket using the actual VulnerableHostnameVerifier. It confirms the bypass over a live TLS connection.
CVE-2025-59060/poc/poc_vector2.py:1-388poc_vector3.py
PoC script (Vector 3)
A Python script that tests the second affected code path (NiFiHostnameVerifier from plugin-nifi). It verifies that both verifier classes are identical code clones and that the NiFi plugin is also vulnerable.
CVE-2025-59060/poc/poc_vector3.py:1-277tls_rogue_server.py
rogue TLS server helper
A Python script that acts as a malicious TLS server, presenting the crafted certificate chain. It is intended to be launched by other PoC scripts and listens for connections, performing a TLS handshake and sending a success response.
CVE-2025-59060/poc/tls_rogue_server.py:1-117