CVE-2024-7806: Open WebUI Cross-Site Request Forgery (CSRF) Vulnerability
Open WebUI before 0.3.33 authenticates with a `SameSite=Lax` cookie and has no CSRF tokens. A crafted web page can make a logged-in victim's browser edit the Python code of an existing pipeline, which then runs with the victim's privileges. That gives remote code execution to an attacker who only needs the victim to open a page. Upgrade to 0.3.33.
Published Mar 20, 2025 · Updated Mar 21, 2025 · Analysis Nov 1, 2026
What an attacker can do
Open WebUI keeps the session in a cookie with SameSite=Lax and checks no CSRF token on state-changing requests (CWE-352). An attacker builds an HTML page that submits a request to the victim's Open WebUI. The advisory targets the call that updates a pipeline's code. The attacker rewrites the Python code of an existing pipeline, and Open WebUI executes it with the victim's rights.
The vector shows low privileges and user interaction. The user must be logged in and must open the attacker's page. The advisory title says non-admin users can reach code execution this way. The result is high confidentiality, integrity and availability impact: server-side Python execution can read model API keys, user data and files the Open WebUI process can reach.
Shared or internet-reachable Open WebUI servers with the pipelines feature enabled are most exposed. The sources do not name the exact endpoint, so check your own routes. The upstream fix sets the cookie secure and samesite attributes from configuration.
Who is affected
Affected: open-webui below 0.3.33. The advisory text names versions up to 0.3.8, and the package range runs to 0.3.33. The risk is highest where pipelines are in use and users browse other sites in the same browser while signed in.
pip show open-webuiFor Docker, check the image tag you run.
open-webui
- Ecosystem
- PyPI
- Affected
- < 0.3.33
- Fixed in
- 0.3.33
- Check
pip show open-webui
How to fix it
Upgrade to open-webui 0.3.33:
pip install --upgrade "open-webui>=0.3.33"The related upstream change, pull request 6054, makes the token cookie's secure and samesite attributes configurable and sets them in the sign-in, sign-up and session paths. The page does not show the diff or the config key names, so read the 0.3.33 release notes for the settings. Set the cookie to the strictest value that works with your login flow, and serve the app only over HTTPS.
How to tell if you were hit
Review pipeline definitions for code you or your team did not write, and check file modification times on pipeline code. Look in proxy or app logs for pipeline update requests whose Referer or Origin header is a third-party site or missing, followed by pipeline execution.
On the host, look for unexpected child processes or outbound connections from the Open WebUI process. Ask users whether they opened unfamiliar links while signed in.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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.
Questions
- Which Open WebUI version fixes CVE-2024-7806?
Version 0.3.33. Earlier releases rely on a
SameSite=Laxcookie without CSRF tokens.- Does the victim have to be an admin?
The advisory says non-admin users can be used to reach code execution. The code runs with the victim's privileges, and the vector shows low privileges required.
- Does the victim need to click something?
Yes. They must be logged in to Open WebUI and visit the attacker's page. The vector marks user interaction as required.
- Is it exploited in the wild?
No source reports exploitation, and it is not in CISA's KEV catalog.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Open WebUI vulnerabilities
All Open WebUI entriesCVE-2026-87011
Open WebUI: Unauthenticated requests can stall the server via uncached OIDC fetches in back-channel logout
high7.5Sep 10, 2026CVE-2026-87012
Open WebUI: Any authenticated user can suppress calendar alerts instance-wide via a non-numeric alert value
medium4.3Sep 10, 2026CVE-2026-87013
Open WebUI: Any authenticated user can start a non-terminating request via a folder parent cycle
medium4.3Sep 10, 2026CVE-2026-87014
Open WebUI: Admin demoted through SSO role sync keeps read and write access to all users' notes
medium6.5Sep 10, 2026CVE-2026-87015
Open WebUI: A user's session cookies are sent to tool servers configured for bearer authentication
medium6.8Sep 10, 2026CVE-2026-87016
Open WebUI: Sign-in as another user via wildcard characters in the OAuth subject claim on SQLite
high8.1Sep 10, 2026
