
PoC of CVE-2023-1177 vulnerability in MLflow (Reproduce)
This repository contains Proof-of-Concept (PoC) exploit code and instructions to reproduce the Local File Inclusion (LFI) vulnerability in MLflow, identified as CVE-2023-1177.
Vulnerability Information:
GET /model-versions/get-artifact endpoint handles paths. An attacker can create a model version with the source field modified to a local path on the server (using file:///). Then, by calling the get-artifact endpoint with the path parameter pointing to a desired file (relative to the modified source), the attacker can read the contents of arbitrary files on the server's filesystem with the privileges of the user running the MLflow server.Environment Setup:
environment.yml file in this repository to recreate exactly the environment used for testing:
conda env create -f environment.yml
attack (or the name defined in the yml file) with Python and all necessary packages (including mlflow==2.1.1, requests, pandas, databricks-cli and a compatible version of setuptools).conda activate attack
Steps to reproduce the vulnerability and PoC, plus a challenge if you are too lazy to reproduce, you can check out this link: https://hackmd.io/@paultheal1en/SymHyk10kg