CVE-2023-1177: Mlflow Mlflow Is Vulnerable To Remote Vulnerability

CRITICAL
Advisory Identifier: GHSA-xg73-94fp-g449
CVSS 9.8
CWE-29 CWE-22
Published
Advisory Summary

CVE-2023-1177 is a CRITICAL (CVSS 9.8) mlflow is vulnerable to remote vulnerability (CWE-29: Path Traversal: '\..\filename') affecting Mlflow libraries in the PyPI ecosystem. The issue involves mlflow is vulnerable to remote file access in `mlflow server` and `mlflow ui` clis. Remediation is available by upgrading affected packages to version 2.2.1.

CVE-2023-1177 at a Glance

CVE Identifier CVE-2023-1177
GHSA Identifier GHSA-xg73-94fp-g449
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-29: Path Traversal: '\..\filename'
Affected Product Mlflow
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2023-1177

To remediate this vulnerability, upgrade all affected Mlflow dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mlflow fixed: 2.2.1
pip install mlflow>=2.2.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show mlflow

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2023-1177, inspect your installed packages using pip:

pip show mlflow

Analyze the terminal output to locate any version of Mlflow in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.1), your application is affected.

Note: The pip show mlflow command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-29: Path Traversal: '\..\filename', where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory. In Mlflow, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Users of the MLflow Open Source Project who are hosting the MLflow Model Registry using the `mlflow server` or `mlflow ui` commands using an MLflow version older than MLflow 2.2.1 may be vulnerable to a remote file access exploit if they are not limiting who can query their server (for example, by using a cloud VPC, an IP allowlist for inbound requests, or authentication / authorization middleware). This issue only affects users and integrations that run the `mlflow server` and `mlflow ui` commands. Integrations that do not make use of `mlflow server` or `mlflow ui` are unaffected; for example, the Databricks Managed MLflow product and MLflow on Azure Machine Learning do not make use of these commands and are not impacted by these vulnerabilities in any way. The vulnerability detailed in https://nvd.nist.gov/vuln/detail/CVE-2023-1177 enables an actor 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. ### Patches This vulnerability has been patched in MLflow 2.2.1, which was released to PyPI on March 2nd, 2023. If you are using `mlflow server` or `mlflow ui` with the MLflow Model Registry, we recommend upgrading to MLflow 2.2.1 as soon as possible. ### Workarounds If you are using the MLflow open source `mlflow server` or `mlflow ui` commands, we strongly recommend limiting who can access your MLflow Model Registry and MLflow Tracking servers using a cloud VPC, an IP allowlist for inbound requests, authentication / authorization middleware, or another access restriction mechanism of your choosing. If you are using the MLflow open source `mlflow server` or `mlflow ui` commands, we also strongly recommend limiting the remote files to which your MLflow Model Registry and MLflow Tracking servers have access. For example, if your MLflow Model Registry or MLflow Tracking server uses cloud-hosted blob storage for MLflow artifacts, make sure to restrict the scope of your server's cloud credentials such that it can only access files and directories related to MLflow. ### References More information about the vulnerability is available at https://nvd.nist.gov/vuln/detail/CVE-2023-1177.

CVE-2023-1177 Affected Mlflow Versions

1 component(s)
Fixed Versions:
2.2.1
Product / Package Ecosystem Affected Versions Fixed Version
mlflow
PyPI
< 2.2.1
2.2.1

References

Frequently Asked Questions

What is CVE-2023-1177?
CVE-2023-1177 is a security vulnerability in Mlflow involving mlflow is vulnerable to remote file access in `mlflow server` and `mlflow ui` CLIs under CWE-29: Path Traversal: '\..\filename'.
Which Mlflow versions are affected?
Affected versions include releases prior to 2.2.1 across affected packages: mlflow.
What version fixes CVE-2023-1177?
Upgrading to 2.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mlflow affected?
Yes, mlflow is affected in releases prior to 2.2.1. Upgrade your dependency to 2.2.1 or later.
What is the CVSS score of CVE-2023-1177?
CVE-2023-1177 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2023-1177?
CVE-2023-1177 is classified under CWE-29: Path Traversal: '\..\filename' (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory.).
How can I check PyPI dependencies for CVE-2023-1177?
Run the dependency tree command: 'pip show mlflow'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xg73-94fp-g449",
  "modified" : "2024-10-01T19:24:26Z",
  "published" : "2023-03-24T22:01:09Z",
  "aliases" : [ "CVE-2023-1177" ],
  "summary" : "mlflow is vulnerable to remote file access in `mlflow server` and `mlflow ui` CLIs",
  "details" : "### Impact\n\nUsers of the MLflow Open Source Project who are hosting the MLflow Model Registry using the `mlflow server` or `mlflow ui` commands using an MLflow version older than MLflow 2.2.1 may be vulnerable to a remote file access exploit if they are not limiting who can query their server (for example, by using a cloud VPC, an IP allowlist for inbound requests, or authentication / authorization middleware).\n\nThis issue only affects users and integrations that run the `mlflow server` and `mlflow ui` commands. Integrations that do not make use of `mlflow server` or `mlflow ui` are unaffected; for example, the Databricks Managed MLflow product and MLflow on Azure Machine Learning do not make use of these commands and are not impacted by these vulnerabilities in any way.\n\nThe vulnerability detailed in https://nvd.nist.gov/vuln/detail/CVE-2023-1177 enables an actor 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.\n\n### Patches\nThis vulnerability has been patched in MLflow 2.2.1, which was released to PyPI on March 2nd, 2023. If you are using `mlflow server` or `mlflow ui` with the MLflow Model Registry, we recommend upgrading to MLflow 2.2.1 as soon as possible.\n\n### Workarounds\nIf you are using the MLflow open source `mlflow server` or `mlflow ui` commands, we strongly recommend limiting who can access your MLflow Model Registry and MLflow Tracking servers using a cloud VPC, an IP allowlist for inbound requests, authentication / authorization middleware, or another access restriction mechanism of your choosing.\n\nIf you are using the MLflow open source `mlflow server` or `mlflow ui` commands, we also strongly recommend limiting the remote files to which your MLflow Model Registry and MLflow Tracking servers have access. For example, if your MLflow Model Registry or MLflow Tracking server uses cloud-hosted blob storage for MLflow artifacts, make sure to restrict the scope of your server's cloud credentials such that it can only access files and directories related to MLflow.\n\n### References\nMore information about the vulnerability is available at https://nvd.nist.gov/vuln/detail/CVE-2023-1177.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mlflow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.2.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mlflow/mlflow/security/advisories/GHSA-xg73-94fp-g449"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-1177"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mlflow/mlflow/pull/7891/commits/7162a50c654792c21f3e4a160eb1a0e6a34f6e6e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mlflow/mlflow/commit/7162a50c654792c21f3e4a160eb1a0e6a34f6e6e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mlflow/mlflow"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/mlflow/PYSEC-2023-29.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.dev/bounties/1fe8f21a-c438-4cba-9add-e8a5dab94e28"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-29" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-24T22:01:09Z",
    "nvd_published_at" : "2023-03-24T15:15:00Z"
  }
}