NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · MLflow

CVE-2022-0736: Insecure Temporary File in mlflow

highCVSS 4.0 8.8 · 3.0 8.2GHSA-vqj2-4v8m-8vrq

MLflow before 1.23.1 uses the deprecated tempfile.mktemp() to create a temporary file, which is an insecure temporary file flaw (CWE-377). The advisory names the function and says mkstemp() should be used instead. Upgrade to mlflow 1.23.1.

Published Feb 24, 2022 · Updated Sep 30, 2024 · Analysis Nov 2, 2026

What an attacker can do

tempfile.mktemp() returns a file name without creating the file. Another process can create a file or symlink at that name before MLflow opens it. MLflow then reads or writes a file the other party controls. Python's own docs deprecate the function for this reason.

The advisory text is thin. It does not say which MLflow code path calls mktemp(), and we found no further detail in the sources, so we cannot name the function. The scores differ: CVSS 3.0 gives network, no privileges, low integrity impact and high availability impact (8.2), which suggests a flaw reachable through the server. The CWE list also includes exposure of a resource to the wrong sphere (CWE-668).

In practice, teams running a shared MLflow host should treat it as a way for another user or request to disrupt or tamper with files the server handles. Do not expect code execution from this entry alone.

Who is affected

pip package mlflow before 1.23.1. Check:

pip show mlflow

Exposure is highest on shared hosts and on MLflow servers that others can reach over the network.

mlflow

Ecosystem
PyPI
Affected
< 1.23.1
Fixed in
1.23.1
Check
pip show mlflow

How to fix it

Upgrade to mlflow 1.23.1 or later:

pip install --upgrade "mlflow>=1.23.1"

The fix is commit 61984e6843d2e59235d82a580c529920cd8f3711, which follows the advisory's guidance to use mkstemp() instead of mktemp(). No workaround is named. On shared systems, point the process at a private temporary directory until you upgrade.

How to tell if you were hit

No log line is documented. On shared hosts, inspect the temp directory used by the MLflow process for symlinks or files owned by other users with names that look like MLflow temporary files. Confirm the mlflow version in every environment that runs a server.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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

Questions

Which mlflow version fixes CVE-2022-0736?

mlflow 1.23.1 contains the fix. Every release older than 1.23.1 is affected, so upgrade to it or later.

What is wrong with tempfile.mktemp()?

It picks a name without creating the file, so another process can plant a file or symlink at that name first. mkstemp() creates the file atomically.

Which MLflow function is affected?

The advisory does not say, and the sources we read give no call site. Only the use of mktemp() is documented.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More MLflow vulnerabilities

All MLflow entries