/

CVE-2025-15036

Severity:

CRITICAL RISK

(10.0)

Path Traversal (CWE-22) in MLflow Artifact Extraction

CVE-2025-15036

Modified

Vulnerability type

Category:

Path Traversal

CWE:

CWE-29, CWE-22

Impact:

Arbitrary File Overwrite and Privilege Escalation

Severity:

CRITICAL RISK

(10.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical path traversal vulnerability in MLflow's artifact extraction logic allows crafted tar.gz archives to write files outside the intended cache directory.

When an attacker controls the archive contents, they can overwrite arbitrary files or escalate privileges, particularly in multi-tenant or shared cluster deployments.

Affected context

This vulnerability appears in environments where MLflow uses the extract_archive_to_dir function from dbconnect_artifact_cache.py to unpack tar.gz artifacts.

It is most relevant when:

  • Artifact archives are sourced from locations that tenants or users can influence
  • Extraction occurs into a sandbox or cache directory assumed to be isolated
  • The surrounding infrastructure treats the MLflow runtime as a trusted component with broad filesystem access

Exploit preconditions

  • Attack surface: MLflow artifact ingestion or cache population mechanism that accepts tar.gz files
  • Required access: Ability to supply or alter tar.gz artifacts processed by extract_archive_to_dir
  • Trigger point: Automatic or manual extraction of an attacker-controlled archive by MLflow
  • Why exploitation is possible: Tar member paths are not validated or normalized, enabling ../ sequences and absolute paths to redirect writes outside the target directory

Why this happens

The core issue stems from trusting archive metadata without enforcing directory confinement.

The extraction routine iterates over tar members and writes them to disk based directly on their embedded paths, without checking for traversal patterns such as ../ or absolute paths.

This behavior aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory and CWE-29: Path Traversal in Archives, where unvalidated paths within container formats are allowed to escape an intended sandbox.

Potential impact

  • Overwrite of arbitrary files accessible to the MLflow process
  • Introduction of malicious configuration or code into the host filesystem
  • Escaping the artifact cache directory and writing into shared or system locations
  • Local privilege escalation if sensitive system or service files can be modified
  • Compromise of other tenants' data or workloads in shared cluster environments

General mitigation guidance

Effective mitigation focuses on constraining extraction targets and reducing trust in archive metadata.

Common defensive patterns include:

  • Normalizing and validating tar member paths before extraction, rejecting entries that resolve outside the intended directory
  • Enforcing a strict, whitelisted extraction root and ignoring absolute paths or ../ segments
  • Treating user- or tenant-supplied archives as untrusted and applying additional validation or filtering
  • Running MLflow components with least-privilege filesystem access, limiting the damage from any escaped writes
  • Isolating artifact processing in dedicated containers or sandboxes to contain potential traversal effects

How teams detect issues like this

Detection typically involves a mix of code-centric and operational approaches:

  • Static analysis rules that flag archive extraction code using unvalidated member names or paths
  • Code review checklists requiring path normalization when interacting with tar, zip, or similar archives
  • Runtime logging of extraction targets, with alerting when writes occur outside expected cache or sandbox directories
  • Policy enforcement in CI/CD to block unsafe archive-handling patterns and encourage vetted helper utilities for extraction

Sources

SourceLink
github.comgithub.com/mlflow/mlflow/commit/3bf6d81ac4d38654c8ff012dbd0c3e9f17e7e346
huntr.comhuntr.com/bounties/36c314cf-fd6e-4fb0-b9b0-1b47bcdf0eb0
access.redhat.comaccess.redhat.com/security/cve/CVE-2025-15036
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2452925
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-15036.json

Frequently asked

questions

Exploitability depends on who can control artifact archives. In environments where users or external systems can supply tar.gz files to MLflow, the issue can be widely exploitable and may cross tenant boundaries.

An attacker must be able to upload, modify, or otherwise cause MLflow to process a crafted tar.gz archive. No direct shell access is required; control over the archive contents is sufficient.

The safest approach is to strictly validate and normalize all archive member paths before extraction, ensuring they resolve within a designated directory and rejecting any entry that attempts traversal or uses absolute paths. Combining this with restricted filesystem permissions further reduces risk.

Treat all file and archive metadata as untrusted input, apply canonical path resolution and directory confinement, and adopt shared utility functions that enforce these rules. Integrating secure file handling patterns into coding standards and automated review tools helps prevent regressions.

Find out what's already
exploitable in your codebase.