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.
[
{
"source": "https://github.com/mlflow/mlflow/commit/328242e01b766129396415be219cb96127097501",
"signature_version": "v1",
"signature_type": "Line",
"target": {
"file": "mlflow/java/scoring/src/main/java/org/mlflow/sagemaker/ScoringServer.java"
},
"id": "CVE-2024-1558-0490fec7",
"digest": {
"line_hashes": [
"331374387258698623515503197375262902471",
"56531494967603305558894176301696978897",
"156845208350900572074037141806451871031",
"236113965666297154310270274411699188635"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://github.com/mlflow/mlflow/commit/328242e01b766129396415be219cb96127097501",
"signature_version": "v1",
"signature_type": "Function",
"target": {
"function": "doGet",
"file": "mlflow/java/scoring/src/main/java/org/mlflow/sagemaker/ScoringServer.java"
},
"id": "CVE-2024-1558-54219b73",
"digest": {
"length": 189.0,
"function_hash": "103832320670295227953645632588587077659"
},
"deprecated": false
},
{
"source": "https://github.com/mlflow/mlflow/commit/328242e01b766129396415be219cb96127097501",
"signature_version": "v1",
"signature_type": "Function",
"target": {
"function": "testScoringServerWithValidPredictorRespondsToVersionCorrectly",
"file": "mlflow/java/scoring/src/test/java/org/mlflow/ScoringServerTest.java"
},
"id": "CVE-2024-1558-9f1fee19",
"digest": {
"length": 483.0,
"function_hash": "248178710733966095301624193790593745960"
},
"deprecated": false
},
{
"source": "https://github.com/mlflow/mlflow/commit/328242e01b766129396415be219cb96127097501",
"signature_version": "v1",
"signature_type": "Line",
"target": {
"file": "mlflow/java/scoring/src/test/java/org/mlflow/ScoringServerTest.java"
},
"id": "CVE-2024-1558-d79dc76d",
"digest": {
"line_hashes": [
"227586388277291964245723347465144503129",
"214612006548484888068671228559130409821",
"141702509437346544668394886097631250819",
"44304877576058785675745254216915397335"
],
"threshold": 0.9
},
"deprecated": false
}
]