Kedro allows Remote Code Execution by Pulling Micro Packages
The pull_package() function in Kedro downloads and extracts micro packages, and during this process it calls project_wheel_metadata() which executes the setup.py file inside the tar archive. An attacker could craft a malicious package to run arbitrary commands on the victim's machine.
kedro
Originally disclosed on huntr
In kedro-org/kedro version 0.19.8, the pull_package() API function allows users to download and extract micro packages from the Internet. However, the function project_wheel_metadata() within the code path can execute the setup.py file inside the tar file, leading to remote code execution (RCE) by running arbitrary commands on the victim's machine.
From the GitHub Advisory Database (GHSA-rm69-wvpv-r2w7, CC BY 4.0).
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
Root cause
Likely the pull_package() function extracts and processes a downloaded tar archive without validating its contents, and the metadata extraction step executes setup.py from the archive.
Impact
An attacker could run arbitrary commands on the victim's machine, leading to remote code execution.
What the attacker needed
Victim uses pull_package() on a malicious package
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.
Kedro is a tool for building data pipelines. Its pull_package() function lets you download a small package from the internet, but when it does so it also runs a file called setup.py from inside that package. If an attacker puts harmful commands in that file, they run on your computer when you pull the package.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.