AgentbeamBeta
AI agent vulnerability · MLflow

CVE-2024-1558: mlflow vulnerable to Path Traversal

highCVSS 3.0 7.5GHSA-j62r-wxqq-f3gf

MLflow 2.9.2 and earlier has a path traversal in _create_model_version() in server/handlers.py. A crafted source parameter slips past the relative-path check, and the /model-versions/get-artifact handler then returns arbitrary files from the server. The advisory lists 2.12.1 as the patched version.

Published Apr 16, 2024 · Updated Aug 9, 2024 · Analysis Nov 18, 2026

What an attacker can do

_create_model_version() validates the model version source with _validate_non_local_source_contains_relative_paths. The advisory says the check mishandles unquoted URL characters, and the code later uses the original source value instead of the one it checked. An attacker can therefore register a model version whose source passes validation but resolves to a path outside the artifact store.

The attacker then requests the file through /model-versions/get-artifact and the server returns its contents. The CVSS 3.0 vector (AV:N/AC:L/PR:N/UI:N) says no authentication or user interaction is needed, and only confidentiality is hit. The files are whatever the MLflow process can read: configuration, credentials, cloud keys, other teams' model artifacts. Many tracking servers have no authentication in front of them, so reachability is the key risk factor.

Who is affected

The pip package mlflow is affected up to and including 2.9.2. The risk applies to tracking servers whose model registry API is reachable by untrusted clients.

Check the version on the tracking server host:

pip show mlflow

The flaw is related to, but separate from, the earlier file-inclusion issue fixed in 2.10.0 (CVE-2024-3573).

mlflow

Ecosystem
PyPI
Affected
<= 2.9.2
Fixed in
2.12.1
Check
pip show mlflow

How to fix it

Upgrade to mlflow 2.12.1, the patched version in the advisory:

pip install --upgrade mlflow==2.12.1

The sources we read do not describe the code change. They give no workaround. Until you upgrade, keep the tracking server off untrusted networks and put authentication in front of the registry API.

How to tell if you were hit

Review registered model versions for source values that contain encoded characters, such as %2e or %2f, or that point outside your artifact root. Check access logs for calls to /model-versions/get-artifact that request paths like system files, and for model version creation calls shortly before them.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to mberges21.

Questions

Which MLflow version fixes CVE-2024-1558?

2.12.1. Versions up to and including 2.9.2 are affected.

Is authentication required?

No, according to the CVSS vector: no privileges and no user interaction. A server with authentication in front reduces exposure to those who hold an account.

Does upgrading to 2.10.0 fix it?

Not according to the advisory. Its patched version is 2.12.1. The 2.10.0 release fixes a related but separate issue.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More MLflow vulnerabilities

All MLflow entries