CVE-2025-66249 Overview
CVE-2025-66249 is a Path Traversal vulnerability affecting Apache Livy, a popular REST service for interacting with Apache Spark clusters. This vulnerability allows attackers to bypass directory restrictions when the non-default configuration livy.file.local-dir-whitelist is enabled, potentially allowing unauthorized access to files outside the intended directory structure.
The vulnerability exists in Apache Livy versions from 0.3.0 before 0.9.0. When administrators configure a custom whitelist directory, the path validation mechanism can be circumvented, enabling attackers to traverse directories and access sensitive files on the server.
Critical Impact
Attackers can bypass directory whitelisting controls to access, read, or potentially modify files outside of authorized directories on systems running Apache Livy with non-default configurations.
Affected Products
- Apache Livy versions 0.3.0 through 0.8.x
- Systems with custom livy.file.local-dir-whitelist configuration
- Apache Spark clusters using Livy REST interface
Discovery Timeline
- 2026-03-13 - CVE CVE-2025-66249 published to NVD
- 2026-03-19 - Last updated in NVD database
Technical Details for CVE-2025-66249
Vulnerability Analysis
This Path Traversal vulnerability (CWE-22) exists in Apache Livy's file access control mechanism. Under default configurations, Apache Livy properly restricts file access. However, when administrators configure the livy.file.local-dir-whitelist setting to allow access to specific directories, the directory checking logic contains a flaw that can be exploited.
The vulnerability enables an authenticated attacker with network access to manipulate file path parameters to escape the configured whitelist directory. This could result in unauthorized file access, information disclosure, or in some scenarios, modification of files outside the intended scope.
The attack requires low privileges and no user interaction, though the scope is limited to the local system. Successful exploitation can impact confidentiality, integrity, and availability of the affected system to a limited degree.
Root Cause
The root cause lies in improper validation of file path inputs when the livy.file.local-dir-whitelist configuration is set to a non-default value. The directory checking mechanism fails to properly sanitize path traversal sequences (such as ../) when validating whether requested paths fall within the configured whitelist.
When the whitelist feature is enabled, the path normalization occurs in an incorrect order relative to the authorization check, allowing specially crafted paths to pass validation while ultimately resolving to directories outside the intended scope.
Attack Vector
The attack is network-based, targeting the Apache Livy REST API. An authenticated attacker can send malicious requests containing path traversal sequences to access files outside the configured whitelist directory.
The vulnerability can only be exploited when:
- Apache Livy Server is running with a non-default configuration
- The livy.file.local-dir-whitelist configuration option is explicitly set
- The attacker has valid credentials with at least low-level privileges to interact with the Livy API
The attack involves crafting HTTP requests to the Livy REST endpoints with manipulated file path parameters containing directory traversal sequences that bypass the whitelist validation logic.
Detection Methods for CVE-2025-66249
Indicators of Compromise
- Unusual file access patterns in Apache Livy logs showing requests with ../ sequences
- HTTP requests to Livy REST API containing encoded path traversal characters (%2e%2e%2f)
- Access attempts to sensitive system files through the Livy interface
- Unexpected file read or write operations from the Livy process
Detection Strategies
- Monitor Apache Livy access logs for requests containing path traversal patterns such as ../, ..\\, or URL-encoded equivalents
- Implement web application firewall (WAF) rules to detect and block path traversal attempts in API requests
- Configure intrusion detection systems to alert on anomalous file access patterns from the Livy service account
- Review authentication logs for suspicious activity from accounts accessing file-related Livy endpoints
Monitoring Recommendations
- Enable verbose logging for Apache Livy to capture detailed request information including file path parameters
- Deploy file integrity monitoring on directories adjacent to configured whitelist paths
- Implement real-time alerting for any path traversal signatures detected in API traffic
- Regularly audit livy.file.local-dir-whitelist configurations across your environment
How to Mitigate CVE-2025-66249
Immediate Actions Required
- Upgrade Apache Livy to version 0.9.0 or later, which contains the security fix
- If upgrade is not immediately possible, revert livy.file.local-dir-whitelist to its default value
- Review and restrict network access to Apache Livy REST endpoints
- Audit existing Livy configurations to identify instances with custom whitelist settings
Patch Information
Apache has released version 0.9.0 to address this vulnerability. Users are strongly recommended to upgrade to this version or later. The patch properly validates file paths against the configured whitelist, preventing path traversal attacks.
For more information, refer to the Apache Security Discussion and the Openwall OSS-Security Update.
Workarounds
- Remove or comment out the livy.file.local-dir-whitelist configuration to use default settings until patching is possible
- Implement network-level access controls to restrict Livy API access to trusted hosts only
- Deploy a reverse proxy with path validation rules in front of Apache Livy
- Consider temporarily disabling file upload/download functionality if business requirements permit
# Configuration example - Reverting to default configuration
# In livy.conf, remove or comment out the custom whitelist setting:
# livy.file.local-dir-whitelist = /custom/path
#
# Or restrict network access using firewall rules:
# iptables -A INPUT -p tcp --dport 8998 -s trusted_network/24 -j ACCEPT
# iptables -A INPUT -p tcp --dport 8998 -j DROP
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


