Skip to content
RCE Disclosed report Intermediate CVE-2025-14287

MLflow has a command injection in mlflow/sagemaker/__init__.py

MLflow built a shell command by pasting a user-supplied container image name straight into it and ran that command through the operating system shell. An attacker who could pass a crafted value to the CLI's container option could therefore run arbitrary commands on the host.

mlflow/mlflow

Originally disclosed on huntr

A command injection vulnerability exists in mlflow/mlflow versions before v3.7.0, specifically in the mlflow/sagemaker/__init__.py file at lines 161-167. The vulnerability arises from the direct interpolation of user-supplied container image names into shell commands without proper sanitization, which are then executed using os.system(). This allows attackers to execute arbitrary commands by supplying malicious input through the --container parameter of the CLI. The issue affects environments where MLflow is used, including development setups, CI/CD pipelines, and cloud deployments.

From the GitHub Advisory Database (GHSA-xch3-2f9x-wh9f, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

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 container image name was concatenated into a shell command string and executed via os.system() instead of being passed as a separate argument to a non-shell process.

Impact

An attacker able to control the container option could execute arbitrary commands in any environment running the affected MLflow code, including CI/CD pipelines and cloud deployments.

What the attacker needed

Ability to pass the --container CLI option

The fix

The issue was fixed in v3.7.0; more generally, user input should be sanitised and passed as arguments rather than interpolated into a shell 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.

When a program builds a command line by gluing text together and hands it to the system shell, any special shell characters inside that text are treated as instructions rather than plain data. Here the container image name came from the user, so a crafted name could smuggle in extra commands that the machine would then run. This is called command injection.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from mlflow/mlflow

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.