mlflow vulnerable to Path Traversal
The _create_model_version() function in MLflow's server/handlers.py fails to properly validate the source parameter, allowing an attacker to bypass the _validate_non_local_source_contains_relative_paths check. This lets an attacker read arbitrary files on the server through the /model-versions/get-artifact handler.
mlflow
Originally disclosed on huntr
A path traversal vulnerability exists in the _create_model_version() function within server/handlers.py of the mlflow/mlflow repository, due to improper validation of the source parameter. Attackers can exploit this vulnerability by crafting a source parameter that bypasses the _validate_non_local_source_contains_relative_paths(source) function's checks, allowing for arbitrary file read access on the server. The issue arises from the handling of unquoted URL characters and the subsequent misuse of the original source value for model version creation, leading to the exposure of sensitive files when interacting with the /model-versions/get-artifact handler.
From the GitHub Advisory Database (GHSA-j62r-wxqq-f3gf, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely improper validation of the source parameter, where unquoted URL characters bypass the relative-path check and the original source value is later misused for model version creation.
What the attacker needed
Access to model version creation; crafted source parameter
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A path traversal bug lets someone trick a program into reading files it should not, by giving a file path that sneaks past the program's checks. Here, MLflow did not properly check the 'source' value when creating a model version, so a crafted value could make the server hand back sensitive files. The attacker does not need special access beyond being able to interact with the model version creation feature.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.