CVE-2022-0736: Mlflow Insecure Temporary File Vulnerability

HIGH
Advisory Identifier: GHSA-vqj2-4v8m-8vrq
CVSS 8.2
CWE-668 CWE-377
Published
Advisory Summary

CVE-2022-0736 is a HIGH (CVSS 8.2) insecure temporary file vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Mlflow libraries in the PyPI ecosystem. The issue involves insecure temporary file in mlflow. Remediation is available by upgrading affected packages to version 1.23.1.

CVE-2022-0736 at a Glance

CVE Identifier CVE-2022-0736
GHSA Identifier GHSA-vqj2-4v8m-8vrq
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Mlflow
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/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 None (C:N)
Integrity Low (I:L)
Availability High (A:H)

How to Fix CVE-2022-0736

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: 1.23.1
pip install mlflow>=1.23.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-2022-0736, 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 1.23.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-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. 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

mlflow prior to 1.23.1 contains an insecure temporary file. The insecure function `tempfile.mktemp()` is deprecated and `mkstemp()` should be used instead.

CVE-2022-0736 Affected Mlflow Versions

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

References

Frequently Asked Questions

What is CVE-2022-0736?
CVE-2022-0736 is a security vulnerability in Mlflow involving Insecure Temporary File in mlflow under CWE-668: Exposure of Resource to Wrong Sphere.
Which Mlflow versions are affected?
Affected versions include releases prior to 1.23.1 across affected packages: mlflow.
What version fixes CVE-2022-0736?
Upgrading to 1.23.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mlflow affected?
Yes, mlflow is affected in releases prior to 1.23.1. Upgrade your dependency to 1.23.1 or later.
What is the CVSS score of CVE-2022-0736?
CVE-2022-0736 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H.
What CWE is associated with CVE-2022-0736?
CVE-2022-0736 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check PyPI dependencies for CVE-2022-0736?
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-vqj2-4v8m-8vrq",
  "modified" : "2024-09-30T20:52:09Z",
  "published" : "2022-02-24T00:00:54Z",
  "aliases" : [ "CVE-2022-0736" ],
  "summary" : "Insecure Temporary File in mlflow",
  "details" : "mlflow prior to 1.23.1 contains an insecure temporary file. The insecure function `tempfile.mktemp()` is deprecated and `mkstemp()` should be used instead.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mlflow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.23.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-0736"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mlflow/mlflow/commit/61984e6843d2e59235d82a580c529920cd8f3711"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-vqj2-4v8m-8vrq"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mlflow/mlflow"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/mlflow/PYSEC-2022-28.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.dev/bounties/e5384764-c583-4dec-a1d8-4697f4e12f75"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-377", "CWE-668" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-02-24T21:42:26Z",
    "nvd_published_at" : "2022-02-23T09:15:00Z"
  }
}