CVE-2022-43396: Apache Kylin Command Injection Vulnerability

org.apache.kylin:kylin Updated 02 Oct 2025

Summary

30/12/2022
Yes i
High
8.8

CVE-2022-43396: Apache Kylin vulnerable to Command injection by Useless configuration. Affects org.apache.kylin:kylin versions >= 2.0.0, < 4.0.3. Fixed in 4.0.3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Apache Kylin is an open-source distributed analytics engine designed to provide OLAP (Online Analytical Processing) capability on big data. It allows users to query large datasets in real-time using SQL-like queries. Kylin leverages Apache Spark for distributed computing and supports various data sources, including Hadoop HDFS, Hive, and HBase. However, a vulnerability has been discovered in Kylin that allows for command injection through a misconfiguration.

Vulnerability Detail

The vulnerability, identified as CVE-2022-43396, arises from a flaw in the fix for a previous vulnerability (CVE-2022-24697). While a blacklist is implemented to filter user input commands, it can be bypassed, enabling an attacker to control the command by manipulating the kylin.engine.spark-cmd parameter in the conf configuration. This command injection vulnerability poses a high risk as it allows an authenticated attacker to execute arbitrary commands with the privileges of the Kylin process. The impact of successful exploitation includes unauthorized access, data manipulation, and potential compromise of the underlying system.

How To Fix

Minimum fixed version

4.0.3

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can manually inspect and sanitize the kylin.engine.spark-cmd parameter in the conf configuration. Ensure that the parameter only allows necessary and safe commands, and restrict any user input that may be used for command injection. Here is an example of how to sanitize the parameter using Java code:

String sparkCmd = conf.get("kylin.engine.spark-cmd");
String sanitizedCmd = sparkCmd.replaceAll("[^a-zA-Z0-9\\s]", "");
conf.set("kylin.engine.spark-cmd", sanitizedCmd);

This code snippet removes any non-alphanumeric characters from the kylin.engine.spark-cmd parameter, reducing the risk of command injection.

Conclusion

The Apache Kylin Command Injection Vulnerability (CVE-2022-43396) poses a significant risk to Kylin deployments. It allows authenticated attackers to execute arbitrary commands with the privileges of the Kylin process, potentially leading to unauthorized access and data manipulation. To mitigate this vulnerability, users should upgrade to Apache Kylin version 4.0.3 or later. Additionally, a temporary workaround is available by manually sanitizing the kylin.engine.spark-cmd parameter in the conf configuration. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.kylin:kylin →

Share this vulnerability

FAQ

Apache Kylin is an open-source distributed analytics engine that provides OLAP capability on big data. It allows users to query large datasets in real-time using SQL-like queries.

The vulnerability allows an authenticated attacker to execute arbitrary commands with the privileges of the Kylin process. This can lead to unauthorized access, data manipulation, and potential compromise of the underlying system.

To fix this vulnerability, it is recommended to upgrade to Apache Kylin version 4.0.3 or later. This version includes a patch that properly filters user input commands, preventing command injection attacks.

As a temporary workaround, users can manually inspect and sanitize the kylin.engine.spark-cmd parameter in the conf configuration. Ensure that the parameter only allows necessary and safe commands, and restrict any user input that may be used for command injection.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.kylin:kylin.

How To Fix

Minimum fixed version

4.0.3

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback