CVE-2024-7806
📋 TL;DR
This vulnerability allows non-admin users to execute arbitrary code remotely via CSRF attacks in open-webui versions up to 0.3.8. Attackers can craft malicious HTML that modifies Python pipeline code when accessed by authenticated victims, leading to remote code execution with the victim's privileges.
💻 Affected Systems
- open-webui
📦 What is this software?
Open Webui by Openwebui
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise with attacker gaining persistent access, data exfiltration, and lateral movement within the network.
Likely Case
Unauthorized code execution leading to data theft, service disruption, or installation of backdoors.
If Mitigated
Limited impact with proper network segmentation and monitoring detecting anomalous activities.
🎯 Exploit Status
Requires victim to be authenticated and visit malicious page; SameSite=Lax cookies enable CSRF.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: > 0.3.8
Vendor Advisory: https://huntr.com/bounties/9350a68d-5f33-4b3d-988b-81e778160ab8
Restart Required: No
Instructions:
1. Update open-webui to version >0.3.8. 2. Verify the update completed successfully. 3. Test application functionality.
🔧 Temporary Workarounds
Implement CSRF Tokens
allAdd CSRF protection tokens to all state-changing endpoints.
SameSite Cookie Enforcement
allSet SameSite attribute to 'Strict' for authentication cookies.
🧯 If You Can't Patch
- Implement WAF rules to block CSRF patterns
- Restrict network access to only trusted sources
🔍 How to Verify
Check if Vulnerable:
Check open-webui version; if <=0.3.8, system is vulnerable.
Check Version:
Check package.json or deployment configuration for version number.
Verify Fix Applied:
Confirm version is >0.3.8 and test CSRF protection on pipeline modification endpoints.
📡 Detection & Monitoring
Log Indicators:
- Unexpected pipeline modifications
- Unusual Python code execution patterns
- CSRF attempt logs
Network Indicators:
- HTTP POST requests to pipeline endpoints without referrer headers
- Cross-origin requests to modification endpoints
SIEM Query:
search 'pipeline modification' AND 'POST' AND NOT referrer:*open-webui*