CVE-2025-61734: Apache Kylin Files or Directories Accessible to External Parties
7.5
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.apache.kylin:kylin | maven | >= 4.0.0, < 5.0.3 | 5.0.3 |
| org.apache.kylin:kylin-common-server | maven | >= 4.0.0, < 5.0.3 | 5.0.3 |
| org.apache.kylin:kylin-common-service | maven | >= 4.0.0, < 5.0.3 | 5.0.3 |
| org.apache.kylin:kylin-core-common | maven | >= 4.0.0, < 5.0.3 | 5.0.3 |
| org.apache.kylin:kylin-core-metadata | maven | >= 4.0.0, < 5.0.3 | 5.0.3 |
| org.apache.kylin:kylin-ops-server | maven | >= 4.0.0, < 5.0.3 | 5.0.3 |
| org.apache.kylin:kylin-server | maven | >= 4.0.0, < 5.0.3 | 5.0.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability, identified as CVE-2025-61734, allows external parties to access files and directories in Apache Kylin. My analysis of the provided patch reveals that the root cause is twofold: insufficient validation of host parameters in several API endpoints and path traversal vulnerabilities in file handling services.\n\n1. Insufficient Host Validation: Multiple methods within the NSystemController and OpsController classes accepted a host parameter for remote operations, such as metadata backup and diagnostic package management. These endpoints did not validate whether the provided host was a legitimate part of the Kylin cluster. An attacker could exploit this by providing a malicious host address, causing the Kylin server to send requests to or interact with an arbitrary machine. This could lead to information disclosure or be used as a vector for other attacks. The patch introduces a checkServer method in NBasicController which is now called by all the affected endpoints to ensure the host is a known and trusted server.\n\n2. Path Traversal: The FileService was susceptible to a path traversal attack. The getMetadataBackupFromTmpPath method used a user-provided file path without adequate sanitization. By crafting a path with directory traversal sequences (e.g., ../), an attacker could read files from arbitrary locations on the server's filesystem. The fix involves a new getSafeAbsolutePath method that normalizes the path and ensures it is within the designated temporary directory, effectively preventing traversal outside of it.\n\n3. Insecure File Creation from Principal: The ProjectService's generateTempKeytab method was vulnerable because it used the principal name to construct a filename without proper validation. A malicious principal name containing path characters could have been used to write a keytab file to an arbitrary location on the filesystem. The patch adds a checkPrincipal method to sanitize the input, checking for invalid characters, length, and path traversal patterns.\n\nIn summary, the vulnerability stems from a lack of input validation on parameters that are used to construct file paths or specify remote hosts. Any runtime profile showing calls to the identified vulnerable functions with unvalidated, user-controlled input for parameters like host, tmpFilePath, or principal would be a strong indicator of attempted or successful exploitation.
Vulnerable functions
org.apache.kylin.rest.controller.NSystemController.broadcastMetadataBackupsrc/common-server/src/main/java/org/apache/kylin/rest/controller/NSystemController.java
org.apache.kylin.rest.service.FileService.getMetadataBackupFromTmpPathsrc/common-service/src/main/java/org/apache/kylin/rest/service/FileService.java
org.apache.kylin.rest.service.ProjectService.generateTempKeytabsrc/common-service/src/main/java/org/apache/kylin/rest/service/ProjectService.java
org.apache.kylin.rest.controller.OpsController.getRemoteDumpDiagPackagesrc/ops-server/src/main/java/org/apache/kylin/rest/controller/OpsController.java
org.apache.kylin.rest.controller.OpsController.getRemoteDumpQueryDiagPackagesrc/ops-server/src/main/java/org/apache/kylin/rest/controller/OpsController.java
org.apache.kylin.rest.controller.OpsController.getRemotePackageStatussrc/ops-server/src/main/java/org/apache/kylin/rest/controller/OpsController.java
org.apache.kylin.rest.controller.OpsController.remoteDownloadPackagesrc/ops-server/src/main/java/org/apache/kylin/rest/controller/OpsController.java
org.apache.kylin.rest.controller.OpsController.remoteStopPackagesrc/ops-server/src/main/java/org/apache/kylin/rest/controller/OpsController.java