Skip to content
File upload Disclosed report Intermediate CVE-2026-4137

MLFlow Creates a Temporary File With Insecure Permissions

The MLFlow library creates temporary directories with overly permissive permissions (world-writable or group-writable), allowing local attackers to modify model artifacts. When these tampered artifacts are later deserialised, an attacker can achieve arbitrary code execution.

mlflow/mlflow

Originally disclosed on huntr

In mlflow/mlflow versions prior to 3.11.0, the get_or_create_nfs_tmp_dir() function in mlflow/utils/file_utils.py creates temporary directories with world-writable permissions (0o777), and the _create_model_downloading_tmp_dir() function in mlflow/pyfunc/__init__.py creates directories with group-writable permissions (0o770). These insecure permissions allow local attackers to tamper with model artifacts, such as cloudpickle-serialized Python objects, and achieve arbitrary code execution when the tampered artifacts are deserialized via cloudpickle.load(). This vulnerability is particularly critical in environments with shared NFS mounts, such as Databricks, where NFS is enabled by default. The issue is a continuation of the vulnerability class addressed in CVE-2025-10279, which was only partially fixed.

From the GitHub Advisory Database (GHSA-f2m9-wcf4-cwwx, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the code used overly permissive file mode bits (0o777 and 0o770) when creating temporary directories, instead of restricting access to the owner only.

Impact

A local attacker could tamper with model artifacts and achieve arbitrary code execution when the tampered artifacts are deserialised, particularly in environments with shared NFS mounts such as Databricks where NFS is enabled by default.

What the attacker needed

Local access to the same filesystem; shared NFS mount (e.g., Databricks)

The fix

The issue was fixed in version 3.11.0 by creating temporary directories with secure permissions.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

MLFlow is a tool for managing machine learning models. It was creating temporary folders that any user on the same computer could write to. A malicious user could put their own code into those folders, and when the legitimate user loaded the model, that code would run.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More from mlflow/mlflow

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.