Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') Affecting mlflow package, versions [,2.9.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.08% (35th 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 ID SNYK-PYTHON-MLFLOW-6102495
  • published 7 Dec 2023
  • disclosed 7 Dec 2023
  • credit Mokrane Abdelmalek

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 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). An attacker can inject code into the Content-Type header of a POST request, which is then reflected back to the user without proper sanitization or escaping. This can lead to compromising user sessions, stealing sensitive information, or performing other malicious actions on the user's behalf.

PoC

from requests import post

url = 'http://127.0.0.1:5000/api/2.0/mlflow/users/create'

headers = {
    'Content-Type': '<script>alert(document.domain)</script>',
}

resp = post(url, headers=headers).text
print(resp)

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
6.5 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Required
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    None
  • Availability (A)
    None
Expand this section

NVD

6.1 medium