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

CVE-2024-37052: MLFlow unsafe deserialization

highCVSS 3.1 8.8GHSA-76cg-cfhx-373f

MLflow loads scikit-learn models with pickle-based deserialization, so a model that an attacker uploaded can run code on whoever loads it. MLflow 1.1.0 through 2.14.1 are affected, and the advisory lists no patched version. Treat every model from a shared tracking server as untrusted code.

Published Jun 4, 2024 · Updated Jun 21, 2024 · Analysis Nov 2, 2026

What an attacker can do

The scikit-learn flavor reads a stored model with pickle.load() or cloudpickle.load(). Cloudpickle is the default. HiddenLayer's write-up of the scikit-learn issue shows the function _load_model_from_local_file in sklearn/__init__.py as the sink. A pickle stream can name any callable, so loading it can run attacker code.

The attack in the write-up has three steps. The attacker puts a payload in the __init__ of an ElasticNet class. They log the model with mlflow.sklearn.log_model() and optionally register it. A victim then calls mlflow.sklearn.load_model() on a models:/ URI, and the code runs on the victim's machine during loading.

The attacker needs to be able to upload to a tracking server or registry that the victim reads from. The victim has to load the model, so user interaction is required (CVSS UI:R). The result is full code execution as the loading user, which on a data scientist laptop or training host can expose cloud credentials, datasets and source code.

Who is affected

pip package mlflow from 1.1.0 up to and including 2.14.1. The risk applies where people load scikit-learn models that someone else logged or registered, for example from a shared registry.

pip show mlflow

mlflow

Ecosystem
PyPI
Affected
>= 1.1.0, <= 2.14.1
Fixed in
No patched version yet
Check
pip show mlflow

How to fix it

The advisory data lists no patched version. Do not rely on a version bump alone. Check the MLflow release notes for your version before assuming it is fixed.

Until then, load only models you trust. Restrict who can log or register models on a shared server, and review changes to registered model versions before promoting them. Load models in an isolated environment with no cloud credentials. The HiddenLayer write-up, which describes the scikit-learn issue, gives no vendor fix.

How to tell if you were hit

Audit the model registry for scikit-learn versions logged by unexpected users, or created shortly before a load. Inspect stored model artifacts, for example the model.pkl file, with a pickle scanner for imports such as os, subprocess or builtins. On hosts that load models, look for child processes spawned by the Python process during load_model, and for unexpected outbound connections.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Deserialization of untrusted data can occur in versions of the MLflow platform running version 1.1.0 or newer, enabling a maliciously uploaded scikit-learn model to run arbitrary code on an end user’s system when interacted with.

Questions

Is cloudpickle safer than pickle here?

No. Cloudpickle is the default serialization format in the scikit-learn flavor, and cloudpickle.load() also runs code stored in the file. The write-up shows both paths.

Does a victim have to do something?

Yes. They must load the malicious model, for example with mlflow.sklearn.load_model() on a models:/ URI. That is the UI:R in the CVSS vector.

Is there a patched MLflow version for CVE-2024-37052?

None is listed. The affected range runs through 2.14.1 and the patched field is empty.

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