CVE-2025-14287: MLflow has a command injection in mlflow/sagemaker/__init__.py
MLflow's SageMaker helper in mlflow/sagemaker/__init__.py builds shell commands from the container image name and runs them with os.system(). A crafted value passed through the CLI --container parameter runs arbitrary commands. The advisory text says versions before 3.7.0; the package data lists the fix as 3.8.0rc0. Upgrade to 3.8.0rc0 or later.
Published Mar 16, 2026 · Updated Mar 17, 2026 · Analysis Oct 31, 2026
What an attacker can do
In push_image_to_ecr(), the user-supplied container image name was placed directly into a shell command string, which os.system() then ran. Shell metacharacters in the name, such as a semicolon or $(...), execute as separate commands with the privileges of the MLflow process (CWE-94).
The attacker must get a malicious value into the --container argument of an MLflow CLI invocation. That is why the CVSS 3.0 vector has high attack complexity and requires user interaction: someone or something must run the command with attacker-influenced input. Typical routes are a CI/CD pipeline that fills the image name from a branch name, a pull request or a config file, or a copied deployment command.
The advisory notes that development setups, CI/CD pipelines and cloud deployments are affected. In a pipeline, the process often holds AWS credentials for ECR and SageMaker, so command execution there can expose cloud keys, source code and model artifacts. Plain MLflow tracking servers are not involved unless they run this deployment path.
Who is affected
The pip package mlflow. The description gives versions before 3.7.0, while the package data lists < 3.8.0rc0 as vulnerable, so treat anything below 3.8.0rc0 as affected. Exposure needs use of the SageMaker deployment helpers with a user-controlled --container value. Check the version:
pip show mlflowSearch pipeline scripts for mlflow sagemaker commands that build the --container value from variables.
mlflow
- Ecosystem
- PyPI
- Affected
- < 3.8.0rc0
- Fixed in
- 3.8.0rc0
- Check
pip show mlflow
How to fix it
Upgrade to 3.8.0rc0 or later:
pip install --upgrade "mlflow>=3.8.0rc0"The fix, in pull request 19277, replaces the os.system() calls in push_image_to_ecr() with direct subprocess.run() calls, so the shell never parses the image name. The sources give no workaround. Until you upgrade, never pass untrusted text to --container, and validate image names against a strict pattern in your pipelines.
How to tell if you were hit
Review CI logs and shell history for mlflow sagemaker invocations where the --container value contains characters like ;, &&, |, backticks or $(. Look for unexpected child processes of the mlflow process, such as curl, sh or wget, and for unusual outbound connections from build runners. Check CloudTrail for use of the runner's AWS credentials from unfamiliar addresses.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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.
Questions
- Which MLflow version fixes CVE-2025-14287?
3.8.0rc0 per the package data. The advisory text says versions before 3.7.0, and the fix PR was labeled for v3.8.0, so use 3.8.0rc0 or later.
- How is the command injection triggered?
By passing a crafted image name to the --container parameter of the MLflow SageMaker CLI. The value was interpolated into a shell string and run with os.system().
- Can a remote attacker exploit it with no interaction?
Not directly. The vector needs user interaction and high complexity. Someone, or an automated job, must run the CLI with attacker-controlled input.
References
Read for this analysis:
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More MLflow vulnerabilities
All MLflow entriesCVE-2026-116690
MLflow vulnerable to arbitrary file read on unauthenticated servers via prompt model version source
high7.5Oct 27, 2026CVE-2026-116691
MLflow CrewAI autologging records LLM provider API keys in logged trace spans
medium6.5Oct 27, 2026CVE-2026-116692
MLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifact modules
critical9.8Oct 27, 2026CVE-2026-115886
MLflow: SSRF on unauthenticated MLflow servers via third-party scorer kwargs in the scorer invoke, register, and GenAI evaluate endpoints
medium6.5Oct 23, 2026CVE-2026-53995
MLflow FileStore trace IDs allow path traversal and arbitrary file writes
high8.2Oct 20, 2026GHSA-gqvg-gmmx-x4hm
MLFLOW_ALLOW_PICKLE_DESERIALIZATION=False safety control bypassed by mlflow.statsmodels flavor — RCE via crafted model artifact
high8.8Sep 1, 2026
