ADVISORIES

PyPA Advisory Database

PYSEC-2026-2661

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

Details

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.

Affected packages

EcosystemPackageAffected versions
PyPImlflow
All versions before 3.8.0rc0 (fixed in 3.8.0rc0)

References