mlflow vulnerable to Path Traversal
A path traversal flaw in MLflow's artifact deletion handler allowed attackers to bypass path validation through double decoding, enabling deletion of arbitrary directories on the server. The issue persisted up to version 2.9.2 despite a prior fix for a similar vulnerability.
mlflow
Originally disclosed on huntr
A path traversal vulnerability exists in the mlflow/mlflow repository, specifically within the artifact deletion functionality. Attackers can bypass path validation by exploiting the double decoding process in the _delete_artifact_mlflow_artifacts handler and local_file_uri_to_path function, allowing for the deletion of arbitrary directories on the server's filesystem. This vulnerability is due to an extra unquote operation in the delete_artifacts function of local_artifact_repo.py, which fails to properly sanitize user-supplied paths. The issue is present up to version 2.9.2, despite attempts to fix a similar issue in CVE-2023-6831.
From the GitHub Advisory Database (GHSA-5mvj-wmgj-7q8c, 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 an extra unquote operation in the delete_artifacts function caused double decoding, so the path validation was performed on a still-encoded string and the decoded path was used for deletion.
What the attacker needed
Access to artifact deletion functionality
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.
Path traversal is when a program accepts a file path from a user but does not properly check it, so someone can use tricks like '../' to reach files or folders outside the intended area. Here, the software decoded the path twice, so a crafted path slipped past the check and let an attacker delete any folder on the server.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.