Summary
Open WebUI's chat completion API previously allowed users to specify arbitrary tool identifiers without enforcing authorization checks, enabling them to invoke any registered server tool.
Because these tools execute using server-side authentication tokens, an attacker who can call the chat completion API may perform unauthorized actions or gain access beyond their intended privileges.
Affected context
This vulnerability appears in Open WebUI deployments that expose the chat completion API and register server-side tools accessible via tool_ids or tool_servers parameters.
It is most relevant where different tools have varying sensitivity or privilege requirements, and where multiple users or tenants share the same Open WebUI instance.
The risk increases in environments where the tools are integrated with external systems or services using high-privilege server tokens.
Exploit preconditions
- Attack surface: Open WebUI chat completion API endpoint.
- Required access: Ability to authenticate or otherwise send requests to the chat completion API (depending on deployment).
- Trigger point: Supplying custom
tool_idsortool_serversvalues in the chat completion request. - Why exploitation is possible: The middleware constructs a
tools_dictand resolves tools viaget_tool_by_idsolely based on user-supplied parameters, without verifying that the requesting user is authorized to use the referenced tool, and then invokes the tool using server-side authentication tokens.
Why this happens
The core issue is a missing authorization step when mapping user-supplied tool identifiers to server-side tools.
The chat completion middleware builds a dictionary of tools (tools_dict) using tool_ids and tool_servers from the request and passes this to get_tool_by_id, which retrieves and executes tools without checking if the caller is allowed to use them.
This aligns with CWE-862: Missing Authorization, where the application correctly authenticates users but fails to enforce fine-grained access control on protected functionality.
Potential impact
- Users may invoke tools they are not intended to access.
- Tools may perform unauthorized operations against external systems using server-side tokens.
- Sensitive data accessible via privileged tools could be exposed to lower-privileged users.
- The boundary between user-level and server-level privileges can be blurred, enabling privilege escalation within the Open WebUI environment.
General mitigation guidance
Mitigations focus on enforcing authorization checks before any tool is invoked based on user-supplied identifiers.
Common defensive patterns include:
- Implementing per-tool or per-tool-server access control lists, mapping tools to roles, groups, or tenants.
- Validating that the requesting user is permitted to use each referenced
tool_idortool_serverbefore resolution and execution. - Designing APIs so that clients select from server-curated tool catalogs associated with their identity, rather than specifying arbitrary IDs.
- Minimizing the privileges of server-side tokens used by tools, aligning them with least-privilege and scoping them per user or per role where feasible.
These patterns reduce the blast radius even when tools are exposed through high-level APIs.
How teams detect issues like this
Detection is generally centered on reviewing access control boundaries and how tools are resolved:
- Static analysis rules can flag flows where user-controlled identifiers directly select privileged resources or functionality without intermediate authorization checks.
- Code reviews should examine middleware and routing logic for missing checks when mapping IDs or names to server resources, especially in shared-tool or multi-tenant environments.
- Logging and monitoring can be configured to track tool invocation events, highlighting unexpected patterns such as low-privilege users calling highly privileged tools.
- Security testing and red teaming can exercise the chat completion API with arbitrary
tool_idsortool_serversto verify that authorization constraints are enforced.

