CVE-2024-37058: MLflow: RCE via malicious LangChain model deserialization
HIGH PoC AVAILABLE CISA: ATTENDAny MLflow deployment running 2.5.0+ that allows external or untrusted model uploads is exposed to arbitrary code execution — simply loading a poisoned LangChain AgentExecutor model triggers it. This is a critical risk for shared MLflow model registries where data scientists or automated pipelines pull and run models without verifying provenance. Patch immediately, audit your registry for unknown model uploads, and enforce strict write-access controls on your model store.
Risk Assessment
High risk in practice despite requiring user interaction — in MLOps pipelines 'user interaction' is frequently automated (CI/CD jobs, scheduled inference, auto-loading from registry). CVSS 8.8 with network vector and low complexity means exploitation is straightforward for anyone who can push a model to the registry. Shared MLflow instances in data science teams compound the blast radius: a single malicious upload can compromise every machine that subsequently loads it. No active KEV listing but the HiddenLayer advisory includes exploit details, lowering attacker skill threshold significantly.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| mlflow | pip | — | No patch |
Do you use mlflow? You're affected.
Severity & Risk
Attack Surface
Recommended Action
6 steps-
PATCH
Upgrade MLflow to the version that addresses this deserialization flaw (verify against the HiddenLayer advisory for exact patched version).
-
AUDIT
Review MLflow model registry for any recently uploaded LangChain AgentExecutor models from unexpected sources — treat unknown uploads as potentially malicious.
-
ACCESS CONTROL
Restrict model upload permissions to a minimal set of CI/CD service accounts; require code review or approval workflow before models enter the registry.
-
SCAN
Run static analysis on model pickle/joblib files before loading (tools: modelscan by ProtectAI).
-
NETWORK ISOLATION
Ensure MLflow UI/API is not internet-facing; place behind VPN or internal network only.
-
DETECTION
Monitor for unexpected process spawning from Python/MLflow processes; alert on outbound connections initiated by model-loading jobs.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2024-37058?
Any MLflow deployment running 2.5.0+ that allows external or untrusted model uploads is exposed to arbitrary code execution — simply loading a poisoned LangChain AgentExecutor model triggers it. This is a critical risk for shared MLflow model registries where data scientists or automated pipelines pull and run models without verifying provenance. Patch immediately, audit your registry for unknown model uploads, and enforce strict write-access controls on your model store.
Is CVE-2024-37058 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2024-37058, increasing the risk of exploitation.
How to fix CVE-2024-37058?
1. PATCH: Upgrade MLflow to the version that addresses this deserialization flaw (verify against the HiddenLayer advisory for exact patched version). 2. AUDIT: Review MLflow model registry for any recently uploaded LangChain AgentExecutor models from unexpected sources — treat unknown uploads as potentially malicious. 3. ACCESS CONTROL: Restrict model upload permissions to a minimal set of CI/CD service accounts; require code review or approval workflow before models enter the registry. 4. SCAN: Run static analysis on model pickle/joblib files before loading (tools: modelscan by ProtectAI). 5. NETWORK ISOLATION: Ensure MLflow UI/API is not internet-facing; place behind VPN or internal network only. 6. DETECTION: Monitor for unexpected process spawning from Python/MLflow processes; alert on outbound connections initiated by model-loading jobs.
What systems are affected by CVE-2024-37058?
This vulnerability affects the following AI/ML architecture patterns: MLOps pipelines, model registry, agent frameworks, model serving, training pipelines.
What is the CVSS score for CVE-2024-37058?
CVE-2024-37058 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 0.40%.
Technical Details
NVD Description
Deserialization of untrusted data can occur in versions of the MLflow platform running version 2.5.0 or newer, enabling a maliciously uploaded Langchain AgentExecutor model to run arbitrary code on an end user’s system when interacted with.
Exploitation Scenario
An adversary with write access to a target organization's MLflow model registry — obtained via compromised credentials, insider threat, or a publicly exposed registry — crafts a malicious LangChain AgentExecutor model. The payload is embedded using Python's pickle serialization, which executes arbitrary code during deserialization. The attacker uploads it with a benign name (e.g., 'langchain-rag-agent-v2') and waits. A data scientist runs a model comparison notebook pulling candidates from the registry, or an automated evaluation pipeline loads the model for benchmarking. Upon load, the payload executes: reverse shell established, cloud credentials exfiltrated from environment variables, and lateral movement begins to connected data stores and GPU clusters. The attacker never needed to touch the victim's network directly — the supply chain did the work.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H References
- hiddenlayer.com/sai-security-advisory/mlflow-june2024 Exploit 3rd Party
Timeline
Related Vulnerabilities
CVE-2025-15379 10.0 MLflow: RCE via unsanitized model dependency specs
Same package: mlflow CVE-2023-3765 10.0 MLflow: path traversal allows arbitrary file read
Same package: mlflow CVE-2026-2635 9.8 mlflow: security flaw enables exploitation
Same package: mlflow CVE-2023-2780 9.8 MLflow: path traversal allows arbitrary file read/write
Same package: mlflow CVE-2023-1177 9.8 MLflow: path traversal allows arbitrary file read/write
Same package: mlflow
AI Threat Alert