Executive brief
MLflow's model loading system includes a security control (`MLFLOW_ALLOW_PICKLE_DESERIALIZATION`) designed to prevent remote code execution from untrusted pickled models. However, the statsmodels flavor implementation completely bypasses this control by calling pickle deserialization directly without any authorization check. An attacker who uploads a crafted model artifact to any accessible MLflow artifact store can execute arbitrary code on any process that loads the model, even when the security control is explicitly enabled by administrators.
Technical details
The vulnerability is a security control bypass (CWE-502: Deserialization of Untrusted Data) in the statsmodels flavor module of MLflow. MLflow introduced the `MLFLOW_ALLOW_PICKLE_DESERIALIZATION` environment variable to block unsafe pickle deserialization across multiple model flavors in response to prior CVE-2024-37052 through CVE-2024-37060. The sklearn flavor and others correctly implement this guard, but `mlflow/statsmodels/__init__.py` L307–320 calls `statsmodels.iolib.api.load_pickle()` (a wrapper around `pickle.load()`) without checking the control variable. When `mlflow.pyfunc.load_model()` dispatches to the statsmodels flavor via dynamic import, the guard is completely bypassed. The attack requires only network access and user interaction to trigger model loading; authentication on artifact stores is disabled by default. An attacker crafts an MLmodel YAML specifying `mlflow.statsmodels` as the loader, packages a malicious pickle file, and uploads both to the artifact store. Any subsequent call to `mlflow.pyfunc.load_model()` deserializes the pickle with full code execution, regardless of the `MLFLOW_ALLOW_PICKLE_DESERIALIZATION` setting. Patch: version 3.15.0 adds the missing guard check to `_load_model()`.
Affected products
- MLflow mlflow >=2.1.0, <3.15.0
Timeline
- 2026-07-27: disclosed: Vulnerability disclosed on GitHub Advisory Database
- 2026-09-01: advisory: Updated advisory published
- 2026-09-01: patched: Fix released in MLflow v3.15.0