GHSL-2021-1048_GHSL-2021-1051: Command injection in Apache Kylin - CVE-2021-45457, CVE-2021-45456, CVE-45458
Apache Kylin had a command injection flaw where a project name was validated differently from the value passed to a shell command, allowing an authenticated attacker to execute arbitrary commands. Other issues included overly broad CORS, disabled CSRF protection, and hardcoded encryption keys.
Originally disclosed on GitHub Security Lab
Multiple vulnerabilities where found on Apache Kylin leading to Command injection.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An authenticated attacker could execute arbitrary commands on the server, and combined with the CORS and CSRF issues, a logged-in victim visiting a malicious page could be tricked into triggering the command injection.
What the attacker needed
Attacker has a valid account; victim is logged in (for CSRF chain)
The fix
The issues were fixed in January 2022 according to the timeline.
How it was found
- Create a new project with a name that contains only alphanumeric characters, such as 'touchpwned'.
- Request the diagnosis dump for a project whose name includes shell metacharacters, such as backticks and a space, that sanitise to the previously created project name.
- The server sanitises the name for lookup but passes the original name to the shell command, executing the injected command.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Apache Kylin is a tool for analysing large datasets. A command injection bug lets an attacker run their own system commands on the server by tricking the application into treating part of a project name as a command. Here, the application checked a cleaned-up version of the name but then used the original name when running a command, so special characters could slip through.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.