CVE-2024-7806: Remote Code Execution by Non-Admin Users via CSRF in open-webui/open-webui
A vulnerability in open-webui/open-webui versions <= 0.3.8 allows remote code execution by non-admin users via Cross-Site Request Forgery (CSRF). The application uses cookies with the SameSite attribute set to lax for authentication and lacks CSRF tokens. This allows an attacker to craft a malicious HTML that, when accessed by a victim, can modify the Python code of an existing pipeline and execute arbitrary code with the victim's privileges.
Other sources
Rejected reason: This CVE ID has been rejected or withdrawn by its CVE Numbering Authority.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/open-webuito a version that resolves this vulnerability.Fixed in 0.3.33 - Configuration
Change the authentication cookie SameSite attribute from lax to strict (or otherwise not-lax) to reduce CSRF risk.
open-webui/open-webui SameSite attribute for authentication cookies = strict (or at least not lax) - Configuration
Enable/require CSRF tokens for requests that modify pipeline code (state-changing actions), since the application currently lacks CSRF tokens.
open-webui/open-webui CSRF tokens for state-changing requests = enabled
Event History
Frequently Asked Questions
What is the severity of CVE-2024-7806?
CVE-2024-7806 is classified as a critical vulnerability due to its capability to allow remote code execution.
How do I fix CVE-2024-7806?
To fix CVE-2024-7806, upgrade open-webui to version 0.3.9 or later, which implements CSRF tokens and adjusts cookie attributes.
Who is affected by CVE-2024-7806?
CVE-2024-7806 affects all users of open-webui versions 0.3.8 and earlier.
What types of attacks can occur due to CVE-2024-7806?
CVE-2024-7806 can facilitate remote code execution attacks, allowing attackers to execute arbitrary code on the server.
Are there any known exploits for CVE-2024-7806?
Yes, there are known exploits for CVE-2024-7806 that leverage the CSRF vulnerabilities to execute unauthorized commands.