Miggo Logo

CVE-2025-61734: Apache Kylin Files or Directories Accessible to External Parties

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.03494%
Published
10/2/2025
Updated
10/2/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.apache.kylin:kylinmaven>= 4.0.0, < 5.0.35.0.3
org.apache.kylin:kylin-common-servermaven>= 4.0.0, < 5.0.35.0.3
org.apache.kylin:kylin-common-servicemaven>= 4.0.0, < 5.0.35.0.3
org.apache.kylin:kylin-core-commonmaven>= 4.0.0, < 5.0.35.0.3
org.apache.kylin:kylin-core-metadatamaven>= 4.0.0, < 5.0.35.0.3
org.apache.kylin:kylin-ops-servermaven>= 4.0.0, < 5.0.35.0.3
org.apache.kylin:kylin-servermaven>= 4.0.0, < 5.0.35.0.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.broadcastMetadataBackup
src/common-server/src/main/java/org/apache/kylin/rest/controller/NSystemController.java
The `broadcastMetadataBackup` function was vulnerable because it accepted a `fromHost` parameter from the request body without validation. An attacker could specify an arbitrary host, potentially causing the server to interact with a malicious machine for metadata backup operations. The patch adds a call to `checkServer` to validate the host.
org.apache.kylin.rest.service.FileService.getMetadataBackupFromTmpPath
src/common-service/src/main/java/org/apache/kylin/rest/service/FileService.java
The `getMetadataBackupFromTmpPath` function was vulnerable to path traversal. It used the `tmpFilePath` parameter to construct a file path without proper sanitization. An attacker could provide a path with `../` sequences to access arbitrary files on the filesystem. The patch introduces the `getSafeAbsolutePath` method to validate that the path is within the expected temporary directory.
org.apache.kylin.rest.service.ProjectService.generateTempKeytab
src/common-service/src/main/java/org/apache/kylin/rest/service/ProjectService.java
The `generateTempKeytab` function was vulnerable because it did not validate the `principal` parameter. A malicious `principal` name containing special characters or path traversal sequences could be used to create a keytab file in an unintended location or with a harmful name. The patch adds the `checkPrincipal` method to sanitize this input.
org.apache.kylin.rest.controller.OpsController.getRemoteDumpDiagPackage
src/ops-server/src/main/java/org/apache/kylin/rest/controller/OpsController.java
The `getRemoteDumpDiagPackage` function was vulnerable as it took a `host` parameter without validation, allowing an attacker to specify an arbitrary host for dumping a diagnostic package. This could lead to information disclosure or interaction with malicious servers. The patch adds a `checkServer` call to validate the host.
org.apache.kylin.rest.controller.OpsController.getRemoteDumpQueryDiagPackage
src/ops-server/src/main/java/org/apache/kylin/rest/controller/OpsController.java
Similar to `getRemoteDumpDiagPackage`, this function was vulnerable due to a lack of validation on the `host` parameter for query diagnostic packages. The patch mitigates this by adding a `checkServer` call.
org.apache.kylin.rest.controller.OpsController.getRemotePackageStatus
src/ops-server/src/main/java/org/apache/kylin/rest/controller/OpsController.java
This function was vulnerable because it did not validate the `host` parameter when checking the status of a remote package. An attacker could use this to probe or interact with arbitrary hosts. The patch adds a `checkServer` call to ensure the host is valid.
org.apache.kylin.rest.controller.OpsController.remoteDownloadPackage
src/ops-server/src/main/java/org/apache/kylin/rest/controller/OpsController.java
The `remoteDownloadPackage` function was vulnerable to attacks where a malicious `host` could be specified for downloading a package. The lack of validation is fixed by adding a `checkServer` call.
org.apache.kylin.rest.controller.OpsController.remoteStopPackage
src/ops-server/src/main/java/org/apache/kylin/rest/controller/OpsController.java
This function was vulnerable as it allowed stopping a package on an arbitrary `host` without validation. The patch adds a `checkServer` call to prevent this.

WAF Protection Rules

WAF Rule

*il*s or *ir**tori*s ****ssi*l* to *xt*rn*l P*rti*s vuln*r**ility in *p**** Kylin. You *r* *in* *s lon* *s t** Kylin's syst*m *n* proj**t **min ****ss is w*ll prot**t**. T*is issu* *****ts *p**** Kylin: *rom *.*.* t*rou** *.*.*. Us*rs *r* r**omm*n

Reasoning

T** vuln*r**ility, i**nti*i** *s *V*-****-*****, *llows *xt*rn*l p*rti*s to ****ss *il*s *n* *ir**tori*s in *p**** Kylin. My *n*lysis o* t** provi*** p*t** r*v**ls t**t t** root **us* is two*ol*: insu**i*i*nt v*li**tion o* *ost p*r*m*t*rs in s*v*r*l