CVE-2024-7035

6.9 MEDIUM

📋 TL;DR

This CSRF vulnerability in open-webui/open-webui v0.3.8 allows attackers to trick authenticated users into performing sensitive actions like deleting data and resetting configurations by visiting malicious websites. All users running the vulnerable version are affected, particularly those with administrative privileges.

💻 Affected Systems

Products:
  • open-webui/open-webui
Versions: v0.3.8
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects deployments where users authenticate to the web interface. The vulnerability exists in the default configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete data loss and application unavailability through mass deletion of RAG databases, memories, and uploads, requiring full restoration from backups.

🟠

Likely Case

Targeted deletion of specific data sets or configuration resets causing service disruption and data integrity issues.

🟢

If Mitigated

No impact if proper CSRF protections are implemented and users avoid suspicious links.

🌐 Internet-Facing: HIGH - Web applications exposed to the internet are directly vulnerable to CSRF attacks from any malicious site.
🏢 Internal Only: MEDIUM - Internal users could still be tricked via phishing emails or compromised internal sites, but attack surface is reduced.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires the victim to be authenticated and visit a malicious site. CSRF attacks are well-understood and easy to implement.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v0.3.9 or later

Vendor Advisory: https://huntr.com/bounties/2ac81740-410b-467a-9244-75d82a6f9e11

Restart Required: Yes

Instructions:

1. Backup current configuration and data. 2. Update to v0.3.9 or later using package manager or manual installation. 3. Restart the open-webui service. 4. Verify the fix by checking version and testing protected endpoints.

🔧 Temporary Workarounds

Web Server CSRF Protection

all

Configure reverse proxy or web server to add CSRF tokens or require POST for sensitive endpoints

# Example nginx location block to block GET requests to sensitive endpoints
location ~ ^/(rag/api/v1/reset|rag/api/v1/reset/db|api/v1/memories/reset|rag/api/v1/reset/uploads)$ {
    if ($request_method = GET) {
        return 405;
    }
}

🧯 If You Can't Patch

  • Implement strict SameSite cookie policies and require re-authentication for sensitive actions
  • Use browser extensions that block CSRF requests and educate users about phishing risks

🔍 How to Verify

Check if Vulnerable:

Check if running v0.3.8 and test if GET requests to /rag/api/v1/reset (and other endpoints) perform actions without CSRF tokens

Check Version:

Check package.json or run: grep -r "version" /path/to/open-webui/package.json

Verify Fix Applied:

After updating, verify GET requests to sensitive endpoints return error codes (405) and only POST with valid CSRF tokens work

📡 Detection & Monitoring

Log Indicators:

  • Multiple GET requests to /rag/api/v1/reset* endpoints from same user in short timeframe
  • Unusual deletion/reset events without corresponding POST requests

Network Indicators:

  • GET requests to sensitive endpoints with Referer headers from external domains
  • Lack of CSRF tokens in requests to protected endpoints

SIEM Query:

source="webui.log" AND (uri_path="/rag/api/v1/reset" OR uri_path="/rag/api/v1/reset/db" OR uri_path="/api/v1/memories/reset" OR uri_path="/rag/api/v1/reset/uploads") AND http_method="GET"

🔗 References

📤 Share & Export