CVE-2023-2780

9.8 CRITICAL

📋 TL;DR

This CVE describes a path traversal vulnerability in MLflow where attackers can use '\..\filename' sequences to access files outside intended directories. It affects MLflow deployments prior to version 2.3.1. The vulnerability allows unauthorized file access and potentially remote code execution.

💻 Affected Systems

Products:
  • MLflow
Versions: All versions prior to 2.3.1
Operating Systems: All platforms running MLflow
Default Config Vulnerable: ⚠️ Yes
Notes: All MLflow deployments using affected versions are vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data exfiltration, or ransomware deployment.

🟠

Likely Case

Unauthorized file access allowing reading of sensitive configuration files, credentials, or source code.

🟢

If Mitigated

Limited impact with proper network segmentation and file system permissions restricting access to critical files.

🌐 Internet-Facing: HIGH - Internet-facing MLflow instances are directly exploitable without authentication.
🏢 Internal Only: MEDIUM - Internal instances still vulnerable but require network access; risk depends on internal segmentation.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability is simple to exploit with publicly available details; no authentication required.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.3.1

Vendor Advisory: https://github.com/mlflow/mlflow/commit/fae77a525dd908c56d6204a4cef1c1c75b4e9857

Restart Required: Yes

Instructions:

1. Stop MLflow service. 2. Upgrade to MLflow 2.3.1 or later using pip: 'pip install mlflow>=2.3.1'. 3. Restart MLflow service.

🔧 Temporary Workarounds

Input Validation Filter

all

Add middleware or request filtering to block paths containing '\..\' sequences.

# Implement custom request handler to sanitize path inputs
# Example Python snippet: if '\\..\\' in request.path: return 400

Network Isolation

linux

Restrict MLflow access to trusted networks only using firewall rules.

# Example iptables rule: iptables -A INPUT -p tcp --dport 5000 -s trusted_network -j ACCEPT
# Block all other access: iptables -A INPUT -p tcp --dport 5000 -j DROP

🧯 If You Can't Patch

  • Implement strict network access controls to limit MLflow exposure to essential users only.
  • Deploy web application firewall (WAF) rules to block path traversal patterns.

🔍 How to Verify

Check if Vulnerable:

Check MLflow version: if version < 2.3.1, system is vulnerable. Test with controlled path traversal attempt using '\..\' in requests.

Check Version:

python -c "import mlflow; print(mlflow.__version__)"

Verify Fix Applied:

After upgrade, confirm version is 2.3.1 or higher and test that path traversal attempts return proper errors (not file contents).

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests containing '\\..\\' sequences in paths
  • Unexpected file access patterns from MLflow process

Network Indicators:

  • Unusual outbound connections from MLflow server
  • Traffic spikes to MLflow endpoints with suspicious paths

SIEM Query:

source="mlflow.log" AND ".." AND ("GET" OR "POST")

🔗 References

📤 Share & Export