CVE-2023-2780
📋 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
- MLflow
📦 What is this software?
Mlflow by Lfprojects
⚠️ 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.
🎯 Exploit Status
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
allAdd 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
linuxRestrict 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")