CVE-2026-45350: Open webui Open WebUI's Chat Completion API Vulnerability

HIGH
Advisory Identifier: GHSA-4pcg-253r-rf9w
CVSS 7.1
CWE-862
Published
Advisory Summary

CVE-2026-45350 is a HIGH (CVSS 7.1) open webui's chat completion api vulnerability (CWE-862: Missing Authorization) affecting Open webui libraries in the PyPI ecosystem. The issue involves open webui's chat completion api allows tool restrictions to be bypassed. Remediation is available by upgrading affected packages to version 0.8.6.

CVE-2026-45350 at a Glance

CVE Identifier CVE-2026-45350
GHSA Identifier GHSA-4pcg-253r-rf9w
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-862: Missing Authorization
Affected Product Open webui
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.1

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:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-45350

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.

open-webui fixed: 0.8.6
pip install open-webui>=0.8.6
Verify Direct and Transitive Dependencies

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-45350, 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.6), 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-862: Missing Authorization, where the product does not perform 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

### Summary Open WebUI v0.6.43 contains a vulnerability in its chat completion API, which allows attackers to bypass tool restrictions, potentially enabling unauthorized actions or access. ### Details In the [chat_completion](https://github.com/open-webui/open-webui/blob/a7271532f8a38da46785afcaa7e65f9a45e7d753/backend/open_webui/main.py#L1529) API, the parameters [tool_ids and tool_servers](https://github.com/open-webui/open-webui/blob/a7271532f8a38da46785afcaa7e65f9a45e7d753/backend/open_webui/main.py#L1613-L1614) are supplied by the user. These parameters are used to [create a tools_dict by the middleware](https://github.com/open-webui/open-webui/blob/a7271532f8a38da46785afcaa7e65f9a45e7d753/backend/open_webui/utils/middleware.py#L1394). This is then used by [get_tool_by_id](https://github.com/open-webui/open-webui/blob/a7271532f8a38da46785afcaa7e65f9a45e7d753/backend/open_webui/models/tools.py#L139) to retrieve the appropriate tool. However, there is no checks in that ensures the user that uses the API has permission to use the tool, meaning that a user can invoke any server tool by supplying the correct tool_id or tool_servers parameters via the chat completion API. Moreover, the authentication token stored in the server would be used when invoking the tool, so the tool will be invoked with the server privilege. ### PoC To reproduce the issue, create an admin user and create an external tool via the admin settings. Set the type to "MCP Streamable HTTP" for the tool, and the url pointing to a mcp server. For example, the public instance of the ["Fetch" mcp server](https://github.com/modelcontextprotocol/servers/blob/main/src/fetch/README.md) can be used, which is located at "https://remote.mcpservers.org/fetch/mcp". Other mcp servers, e.g. the GitHub MCP server can also be used. Then set the "Auth" field appropriately. (Fetch mcp does not require Auth to be set). Set the ID, name and description for the MCP server and set visibility to private. This should prevent any user from using the mcp server. (For the example below, we use the fetch mcp server and set the ID to 1) Next create a user with low privilege and enable API keys from the admin settings. Then use the chat completion API with the low privilege user with a prompt specifying the use of the restricted tool, and include the id of the tool in the tool_ids parameter. For example, to use the fetch mcp server set up before: ``` def chat_with_model(token): url = 'http://localhost:3000/api/chat/completions' headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'application/json' } data = { "model": "llama3.1:latest", "messages": [ { "role": "user", "content": "Use the fetch tool to fetch content of the url https://raw.githubusercontent.com/modelcontextprotocol/servers/refs/heads/main/src/fetch/LICENSE" }], "tool_ids" : [ "server:mcp:1", ], } response = requests.post(url, headers=headers, json=data) return response.json() ``` Note that the tool will be used to fetch the content of the file, despite the tool is restricted and has it's visibility set to private ### Impact This issue may lead to restricted tools being invoked by users via the chat completion API ## Resolution Fixed across two releases - **Local Tool records** (`tool_ids: ["<tool_id>"]` referencing a stored Tool): fixed in commit [9b06fdc8f](https://github.com/open-webui/open-webui/commit/9b06fdc8fe1c933071610336be05f11e77e6c8eb), first released in **v0.7.0**. `get_tools()` in `backend/open_webui/utils/tools.py` (line 166) now resolves the caller's group memberships and rejects each requested `tool_id` whose owner isn't the caller and for which no `AccessGrants.has_access(resource_type='tool', permission='read')` grant exists. Admins continue to bypass when `BYPASS_ADMIN_ACCESS_CONTROL` is enabled (its documented UI/posture purpose). - **Admin-configured MCP servers** (`tool_ids: ["server:mcp:<id>"]`, the report's exact PoC): fixed in commit [4737e1f11](https://github.com/open-webui/open-webui/commit/4737e1f11), first released in **v0.8.6**. The MCP-resolution loop in `backend/open_webui/utils/middleware.py` (line 2670) now calls `has_connection_access(user, mcp_server_connection)` and skips the server with a warning if the user has no grant — the server's stored credentials are never used on behalf of an unauthorized caller. Users on `>= 0.8.6` are not affected.

CVE-2026-45350 Affected Open webui Versions

1 component(s)
Fixed Versions:
0.8.6
Product / Package Ecosystem Affected Versions Fixed Version
open-webui
PyPI
< 0.8.6
0.8.6

References

Frequently Asked Questions

What is CVE-2026-45350?
CVE-2026-45350 is a security vulnerability in Open webui involving Open WebUI's chat completion API allows tool restrictions to be bypassed under CWE-862: Missing Authorization.
Which Open webui versions are affected?
Affected versions include releases prior to 0.8.6 across affected packages: open-webui.
What version fixes CVE-2026-45350?
Upgrading to 0.8.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is open-webui affected?
Yes, open-webui is affected in releases prior to 0.8.6. Upgrade your dependency to 0.8.6 or later.
What is the CVSS score of CVE-2026-45350?
CVE-2026-45350 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2026-45350?
CVE-2026-45350 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check PyPI dependencies for CVE-2026-45350?
Run the dependency tree command: 'pip show open-webui'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4pcg-253r-rf9w",
  "modified" : "2026-05-19T15:59:53Z",
  "published" : "2026-05-14T20:24:48Z",
  "aliases" : [ "CVE-2026-45350" ],
  "summary" : "Open WebUI's chat completion API allows tool restrictions to be bypassed",
  "details" : "### Summary\nOpen WebUI v0.6.43 contains a vulnerability in its chat completion API, which allows attackers to bypass tool restrictions, potentially enabling unauthorized actions or access.\n\n\n### Details\nIn the [chat_completion](https://github.com/open-webui/open-webui/blob/a7271532f8a38da46785afcaa7e65f9a45e7d753/backend/open_webui/main.py#L1529) API, the parameters [tool_ids and tool_servers](https://github.com/open-webui/open-webui/blob/a7271532f8a38da46785afcaa7e65f9a45e7d753/backend/open_webui/main.py#L1613-L1614) are supplied by the user. These parameters are used to [create a tools_dict by the middleware](https://github.com/open-webui/open-webui/blob/a7271532f8a38da46785afcaa7e65f9a45e7d753/backend/open_webui/utils/middleware.py#L1394). This is then used by [get_tool_by_id](https://github.com/open-webui/open-webui/blob/a7271532f8a38da46785afcaa7e65f9a45e7d753/backend/open_webui/models/tools.py#L139) to retrieve the appropriate tool. However, there is no checks in that ensures the user that uses the API has permission to use the tool, meaning that a user can invoke any server tool by supplying the correct tool_id or tool_servers parameters via the chat completion API. Moreover, the authentication token stored in the server would be used when invoking the tool, so the tool will be invoked with the server privilege.\n### PoC\nTo reproduce the issue, create an admin user and create an external tool via the admin settings. Set the type to \"MCP Streamable HTTP\" for the tool, and the url pointing to a mcp server. For example, the public instance of the [\"Fetch\" mcp server](https://github.com/modelcontextprotocol/servers/blob/main/src/fetch/README.md) can be used, which is located at \"https://remote.mcpservers.org/fetch/mcp\". Other mcp servers, e.g. the GitHub MCP server can also be used. Then set the \"Auth\" field appropriately. (Fetch mcp does not require Auth to be set).\n\nSet the ID, name and description for the MCP server and set visibility to private. This should prevent any user from using the mcp server. (For the example below, we use the fetch mcp server and set the ID to 1)\n\nNext create a user with low privilege and enable API keys from the admin settings.\n\nThen use the chat completion API with the low privilege user with a prompt specifying the use of the restricted tool, and include the id of the tool in the tool_ids parameter. For example, to use the fetch mcp server set up before:\n\n```\ndef chat_with_model(token):\n    url = 'http://localhost:3000/api/chat/completions'\n    headers = {\n        'Authorization': f'Bearer {token}',\n        'Content-Type': 'application/json'\n    }\n    data = {\n      \"model\": \"llama3.1:latest\",\n      \"messages\": [\n        {\n          \"role\": \"user\",\n          \"content\": \"Use the fetch tool to fetch content of the url https://raw.githubusercontent.com/modelcontextprotocol/servers/refs/heads/main/src/fetch/LICENSE\"\n        }],\n        \n        \"tool_ids\" : [\n            \"server:mcp:1\",\n        ],\n    }\n    response = requests.post(url, headers=headers, json=data)\n    return response.json()\n```\n\nNote that the tool will be used to fetch the content of the file, despite the tool is restricted and has it's visibility set to private\n\n### Impact\nThis issue may lead to restricted tools being invoked by users via the chat completion API\n\n## Resolution\n\nFixed across two releases\n\n- **Local Tool records** (`tool_ids: [\"<tool_id>\"]` referencing a stored Tool): fixed in commit [9b06fdc8f](https://github.com/open-webui/open-webui/commit/9b06fdc8fe1c933071610336be05f11e77e6c8eb), first released in **v0.7.0**. `get_tools()` in `backend/open_webui/utils/tools.py` (line 166) now resolves the caller's group memberships and rejects each requested `tool_id` whose owner isn't the caller and for which no `AccessGrants.has_access(resource_type='tool', permission='read')` grant exists. Admins continue to bypass when `BYPASS_ADMIN_ACCESS_CONTROL` is enabled (its documented UI/posture purpose).\n\n- **Admin-configured MCP servers** (`tool_ids: [\"server:mcp:<id>\"]`, the report's exact PoC): fixed in commit [4737e1f11](https://github.com/open-webui/open-webui/commit/4737e1f11), first released in **v0.8.6**. The MCP-resolution loop in `backend/open_webui/utils/middleware.py` (line 2670) now calls `has_connection_access(user, mcp_server_connection)` and skips the server with a warning if the user has no grant — the server's stored credentials are never used on behalf of an unauthorized caller.\n\nUsers on `>= 0.8.6` are not affected.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "open-webui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.8.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/security/advisories/GHSA-4pcg-253r-rf9w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45350"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/commit/4737e1f11"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-webui/open-webui"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-webui/open-webui/releases/tag/v0.8.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-14T20:24:48Z",
    "nvd_published_at" : "2026-05-15T22:16:55Z"
  }
}