CVE-2024-7034

7.2 HIGH

📋 TL;DR

CVE-2024-7034 allows attackers to write arbitrary files on systems running vulnerable open-webui versions by exploiting directory traversal in file uploads. This can lead to remote command execution by overwriting critical system files. All users of open-webui version 0.3.8 are affected.

💻 Affected Systems

Products:
  • open-webui
Versions: 0.3.8
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in default configuration when the /models/upload endpoint is accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise via remote command execution by overwriting system binaries or configuration files, potentially leading to complete data loss, service disruption, or attacker persistence.

🟠

Likely Case

Unauthorized modification of application files, configuration tampering, or data corruption leading to service disruption and potential data exposure.

🟢

If Mitigated

Limited to unauthorized file writes within the upload directory if proper input validation and path sanitization are implemented.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires access to the upload endpoint and knowledge of target file paths.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.3.9 or later

Vendor Advisory: https://huntr.com/bounties/711beada-10fe-4567-9278-80a689da8613

Restart Required: No

Instructions:

1. Update open-webui to version 0.3.9 or later using pip: pip install --upgrade open-webui
2. Verify the update completed successfully
3. No restart required as this is a Python application

🔧 Temporary Workarounds

Disable upload endpoint

all

Temporarily disable the vulnerable /models/upload endpoint until patching is possible

Modify application configuration to restrict access to /models/upload endpoint

Implement WAF rules

all

Add web application firewall rules to block directory traversal sequences in filenames

Add WAF rule to block requests containing '../' or similar traversal patterns in filename parameter

🧯 If You Can't Patch

  • Implement strict input validation to sanitize filenames and prevent directory traversal
  • Restrict file upload permissions to non-privileged directories and users

🔍 How to Verify

Check if Vulnerable:

Check if open-webui version is 0.3.8 by examining package version or application metadata

Check Version:

pip show open-webui | grep Version

Verify Fix Applied:

Verify open-webui version is 0.3.9 or later and test that directory traversal attempts in filenames are properly rejected

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed upload attempts with suspicious filenames
  • File write operations outside expected upload directory
  • HTTP requests to /models/upload with filenames containing '../' sequences

Network Indicators:

  • HTTP POST requests to /models/upload with unusual filename parameters
  • Traffic patterns indicating file upload attempts with path traversal

SIEM Query:

source="web_logs" AND uri_path="/models/upload" AND (filename="*../*" OR filename="*..\\*" OR filename="*%2e%2e%2f*")

🔗 References

📤 Share & Export