MLFlow path traversal vulnerability
The archive extraction function in MLflow did not validate the paths of tar members, so a crafted tar.gz could write files outside the intended directory. An attacker who controls the archive could overwrite arbitrary files or gain elevated privileges, potentially escaping the sandbox in shared environments.
mlflow/mlflow
Originally disclosed on huntr
A path traversal vulnerability exists in the extract_archive_to_dir function within the mlflow/pyfunc/dbconnect_artifact_cache.py file of the mlflow/mlflow repository. This vulnerability, present in versions before v3.7.0, arises due to the lack of validation of tar member paths during extraction. An attacker with control over the tar.gz file can exploit this issue to overwrite arbitrary files or gain elevated privileges, potentially escaping the sandbox directory in multi-tenant or shared cluster environments.
From the GitHub Advisory Database (GHSA-vhcx-3pq2-4fvc, 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
The extraction code joined archive member names to the target directory without checking that the resulting paths stayed inside it.
Impact
An attacker controlling the archive could overwrite arbitrary files or gain elevated privileges, potentially escaping the sandbox directory in multi-tenant or shared cluster environments.
What the attacker needed
Control over a tar.gz processed by MLflow
The fix
The extraction should validate each tar member path and reject entries that resolve outside the target directory; the text says the issue is present before v3.7.0, implying it was fixed in that release.
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.
When a program unpacks a compressed archive, it should only write files inside the folder it chose. Here it trusted the file names inside the archive, so a malicious archive could contain a name like '../../somewhere-else' and write outside that folder. This is called a path traversal bug.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.