NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Open WebUI

CVE-2026-45350: Open WebUI's chat completion API allows tool restrictions to be bypassed

highCVSS 3.1 7.1GHSA-4pcg-253r-rf9w

Open WebUI 0.8.5 and earlier does not check whether a caller may use a tool named in the tool_ids or tool_servers parameters of /api/chat/completions. A low-privilege user can invoke a private or admin-only tool, including an admin-configured MCP server, and the call runs with the server's stored credentials. Fixed in open-webui 0.8.6.

Published May 14, 2026 · Updated May 19, 2026 · Analysis Oct 27, 2026

What an attacker can do

The chat completion API takes tool_ids and tool_servers from the request. The middleware builds a tools dictionary from them and resolves each tool by ID. It never asks whether the caller has access. Tool visibility settings, such as private, only hide tools in the UI.

The proof of concept registers a "MCP Streamable HTTP" server as an admin tool with visibility set to private, and creates an ordinary user with an API key. That user sends a completion request with tool_ids set to server:mcp:1 and a prompt asking the model to use the fetch tool. The tool runs. The key point is that the call uses the authentication token stored on the server, so it runs with the server's privilege, not the caller's. If an admin wired up a GitHub MCP server with a personal token, any user with an API key could drive it.

The advisory text says the impact is restricted tools being invoked by users. In practice that means data access, and possibly actions, through whichever tools an admin connected. The attacker needs an account and an API key, and must know or guess the tool ID.

Who is affected

The pip package open-webui at 0.8.5 and earlier. There are two fixes. Local tool records are fixed from v0.7.0. Admin-configured MCP servers, the case in the proof of concept, are fixed from v0.8.6. Users on 0.8.6 or later are not affected. Check the version:

pip show open-webui

Exposure depends on having tools or MCP servers connected with stored credentials, and users with API access.

open-webui

Ecosystem
PyPI
Affected
<= 0.8.5
Fixed in
0.8.6
Check
pip show open-webui

How to fix it

Upgrade to open-webui 0.8.6:

pip install --upgrade open-webui

In the fix, get_tools() in backend/open_webui/utils/tools.py rejects tool IDs the caller does not own and has no read grant for. The MCP resolution loop in middleware.py calls has_connection_access() and skips servers the user cannot use. Admins keep access when BYPASS_ADMIN_ACCESS_CONTROL is enabled. The sources give no workaround. Until you upgrade, disable user API keys if you do not need them.

How to tell if you were hit

Review API logs for POST /api/chat/completions requests from non-admin keys that include tool_ids or tool_servers, especially server:mcp: IDs or tool IDs the user should not have. On the MCP servers behind Open WebUI, look for calls made with the shared credential that you cannot match to an authorized user. After the fix, the server logs a warning when it skips an MCP server for a user with no grant. Open WebUI sits next to an AI agent here, so if Beam records MCP tool calls on the hosts involved, those records show what the tools did.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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 API, the parameters tool_ids and tool_servers are supplied by the user. These parameters are used to create a tools_dict by the middleware. This is then used by get_tool_by_id 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 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, 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, 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.

Credited to Classic298.

Questions

Does CVE-2026-45350 let users run tools with their own rights?

No. The advisory says the stored server token is used, so the tool runs with the server's privileges, not the caller's.

Which version fixes it?

open-webui 0.8.6 fixes the admin-configured MCP server case. Local tool records were fixed earlier in v0.7.0. Anything at 0.8.6 or later is not affected.

Does a private visibility setting protect a tool?

Not before the fix. In the proof of concept, a tool set to private was still invoked by a low-privilege user through tool_ids.

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 entries