NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · MLflow

CVE-2025-15379: MLflow Command Injection vulnerability

criticalCVSS 3.0 10.0GHSA-r23q-823p-vmf7

MLflow's model serving container ran dependency strings from a model's python_env.yaml through a shell. A malicious model artifact can run arbitrary commands on any system that deploys it with env_manager=LOCAL. The advisory text says 3.8.0 is affected and the package data marks everything before 3.8.1 vulnerable. Upgrade to 3.8.1.

Published Mar 30, 2026 · Updated Apr 1, 2026 · Analysis Oct 31, 2026

What an attacker can do

When a model is deployed with env_manager=LOCAL, the container initialization code in _install_model_dependencies_to_env() (mlflow/models/container/__init__.py) reads the dependency list from the artifact's python_env.yaml. It joined the strings, swapped requirements.txt for a path with string replacement, and ran the result through bash -c as a pip install command. Nothing neutralized shell characters (CWE-77).

A dependency entry such as a package name followed by a semicolon, pipe, backticks, $() or && and another command therefore executes that command. The attacker does not need to touch the server: they need a model artifact to reach a deployment, for example through a shared model registry, a downloaded model or a pull from an untrusted source. The commands run with the privileges of the serving container, so they can read model data and cloud credentials, change other models, or move into the network. The CVSS 3.0 vector scores it 10.0: network reach, no privileges, no interaction, changed scope.

Who is affected

The mlflow package on PyPI before 3.8.1, in deployments that serve models with env_manager=LOCAL. The advisory text names version 3.8.0 explicitly, while the package data covers everything below 3.8.1. Other env managers are not described as affected. Check the version:

pip show mlflow

Also review where your model artifacts come from.

mlflow

Ecosystem
PyPI
Affected
< 3.8.1
Fixed in
3.8.1
Check
pip show mlflow

How to fix it

Upgrade to mlflow 3.8.1 or later:

pip install --upgrade "mlflow>=3.8.1"

Commit 361b6f620a changes _install_model_dependencies_to_env to build an argument list that starts with sys.executable -m pip install, splits each dependency with shlex.split, and passes the list to Popen without a shell. Characters like ;, |, && and $() are no longer interpreted. The sources give no workaround. Until you upgrade, do not deploy untrusted model artifacts with env_manager=LOCAL.

How to tell if you were hit

Open the python_env.yaml of deployed and pending model artifacts and look for dependency entries containing ;, |, &&, backticks or $(. On serving hosts, check container logs and process lists for shell children of the pip install step (bash -c) that run anything other than pip. Look for outbound connections made during container startup, and for unexpected files created in the container.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

A command injection vulnerability exists in MLflow's model serving container initialization code, specifically in the _install_model_dependencies_to_env() function. When deploying a model with env_manager=LOCAL, MLflow reads dependency specifications from the model artifact's python_env.yaml file and directly interpolates them into a shell command without sanitization. This allows an attacker to supply a malicious model artifact and achieve arbitrary command execution on systems that deploy the model. The vulnerability affects versions 3.8.0 and is fixed in version 3.8.1.

Credited to drhreddy.

Questions

Am I affected if I do not use env_manager=LOCAL?

The advisory describes the flaw only for deployments with env_manager=LOCAL. Upgrading to 3.8.1 is still advised.

Does the attacker need access to my MLflow server?

They need a malicious model artifact to be deployed. How it arrives depends on your setup, such as a registry or a downloaded model. The CVSS vector lists no privileges and no user interaction.

Which version is fixed?

mlflow 3.8.1. The fix removes the shell and splits dependencies safely.

References

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 entries