Open WebUI Cross-Site Request Forgery (CSRF) Vulnerability
The application used cookies with SameSite=lax for authentication and lacked CSRF tokens, allowing an attacker to craft a malicious HTML page that, when visited by a victim, could modify the Python code of an existing pipeline and execute arbitrary code with the victim's privileges.
open-webui/open-webui
Originally disclosed on huntr
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.
From the GitHub Advisory Database (GHSA-85jc-8h5p-8vw8, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application relied on cookies with SameSite=lax for authentication and did not implement CSRF tokens, so state-changing requests could be forged from another origin.
Impact
An attacker could execute arbitrary code with the victim's privileges, but only if the victim visited the malicious HTML while logged in.
What the attacker needed
Victim is logged in; victim visits malicious HTML
The fix
The application should be fixed by adding CSRF tokens to state-changing requests and setting the SameSite attribute to strict for authentication cookies.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Cross-Site Request Forgery (CSRF) is when a malicious website tricks your browser into sending a request to another site where you are logged in, using your existing cookies. Here, because the login cookie was sent even on requests from other sites (SameSite=lax) and there was no extra token to prove the request came from the real site, an attacker could make your browser change code in a pipeline. That changed code then ran on the server with your permissions, effectively letting the attacker run their own code.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.