CVE-2026-54016: Open WebUI: Open WebUI BOLA: `search_knowledge_files` Allows Unauthorized Knowledge Base File Enumeration

Published Jun 17, 2026
·
Updated

Summary

Open WebUI has a Broken Object Level Authorization (BOLA) vulnerability in the builtin searchknowledgefiles tool.

When native function calling is enabled and the selected model has no attached knowledge bases, an authenticated user can call searchknowledgefiles with an arbitrary knowledgeid. The function then returns file metadata from that knowledge base without checking whether the user has read access.

This allows unauthorized enumeration of private or restricted knowledge base files.

Details

The vulnerable code is in:

backend/openwebui/tools/builtin.py

Affected function:

python async def searchknowledgefiles( query: str, knowledgeid: Optional[str] = None, count: int = 5, skip: int = 0, request: Request = None, user: dict = None, modelknowledge: Optional[list[dict]] = None, ) -> str:

In the "No attached knowledge" branch, when knowledgeid is provided, the function directly calls:

python result = await Knowledges.searchfilesbyid( knowledgeid=knowledgeid, userid=userid, filter={"query": query}, skip=skip, limit=count, )

This code path does not verify that the current user is authorized to access the specified knowledge base.

The missing check is inconsistent with other nearby code paths. For example, the attached-knowledge branch in the same function checks whether the user is an admin, the owner of the knowledge base, or has explicit read access through AccessGrants:

python if not ( userrole == "admin" or knowledge.userid == userid or await AccessGrants.hasaccess( userid=userid, resourcetype="knowledge", resourceid=knowledge.id, permission="read", usergroupids=set(usergroupids), ) ): continue

The sibling function queryknowledgefiles also performs the same authorization check before using user-supplied knowledge base IDs.

The underlying method Knowledges.searchfilesbyid() receives userid, but it does not enforce authorization for the provided knowledgeid. As a result, this builtin tool path can access a knowledge base by ID without verifying the caller's permissions.

PoC

Prerequisites

- The attacker has a valid authenticated Open WebUI account. - The victim owns a private or restricted knowledge base. - The attacker does not own the target knowledge base. - The attacker does not have read permission for the target knowledge base in AccessGrants. - The attacker knows the target knowledgeid. - The selected model has no attached knowledge bases. - Builtin tools are enabled. - The knowledge builtin tool category is enabled. - Native function calling is enabled.

Reproduction Steps

1. Create a private or restricted knowledge base as the victim user.

2. Upload one or more files to that knowledge base.

3. Confirm that the attacker user does not have access to the knowledge base.

4. As the attacker user, send a chat completion request with native function calling enabled:

json { "stream": true, "model": "gpt-4o-mini", "params": { "functioncalling": "native" }, "messages": [ { "role": "user", "content": "Please use the searchknowledgefiles tool with knowledgeid \"c0c84752-2e9d-42bf-bc3c-c0f272aa61c1\" to search all files" } ] }

Replace c0c84752-2e9d-42bf-bc3c-c0f272aa61c1 with the victim's private knowledge base ID.

Expected Result

The request should be denied because the attacker does not have access to the target knowledge base.

Actual Result

searchknowledgefiles returns metadata for files inside the target knowledge base, including:

- file ID; - filename; - knowledge base ID; - knowledge base name; - update timestamp.

Impact

This is a Broken Object Level Authorization / Broken Access Control vulnerability.

An authenticated attacker who knows a valid knowledgeid can enumerate files from private or restricted knowledge bases without authorization.

The leaked metadata may expose sensitive information through filenames, such as:

- financial reports; - employee documents; - customer contracts; - internal roadmap files; - confidential project documents.

The exposed file IDs may also help attackers chain this issue with other knowledge-file access paths, such as viewknowledgefile, to attempt further content extraction.

This vulnerability bypasses the intended AccessGrants permission model and may also allow post-revocation metadata access if a user remembers a previously accessible knowledgeid.

Suggested Fix

Add the same authorization check used in queryknowledgefiles before calling Knowledges.searchfilesbyid():

python if knowledgeid: knowledge = await Knowledges.getknowledgebyid(knowledgeid)

if not knowledge or not ( userrole == "admin" or knowledge.userid == userid or await AccessGrants.hasaccess( userid=userid, resourcetype="knowledge", resourceid=knowledge.id, permission="read", usergroupids=set(usergroupids), ) ): return json.dumps({"error": f"Access denied to knowledge base {knowledgeid}"})

result = await Knowledges.searchfilesbyid( knowledgeid=knowledgeid, userid=userid, filter={"query": query}, skip=skip, limit=count, )

As defense in depth, authorization should also be enforced or safely wrapped around Knowledges.searchfilesbyid() so that future callers cannot accidentally bypass access control.

Other sources

Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.9.6, Open WebUI has a Broken Object Level Authorization (BOLA) vulnerability in the builtin searchknowledgefiles tool. When native function calling is enabled and the selected model has no attached knowledge bases, an authenticated user can call searchknowledgefiles with an arbitrary knowledgeid. The function then returns file metadata from that knowledge base without checking whether the user has read access. This allows unauthorized enumeration of private or restricted knowledge base files. This vulnerability is fixed in 0.9.6.

MITRE

Affected Software

2 affected componentsFixes available
pip/open-webui<=0.9.5
0.9.6
openwebui Open WebUI<0.9.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/open-webui to a version that resolves this vulnerability.

    Fixed in 0.9.6
  2. Upgrade

    Upgrade Open WebUI to a version that resolves this vulnerability.

    Fixed in 0.9.6

Event History

Jun 17, 2026
Advisory Published
via GitHub·02:31 PM
Data Sourced
via GitHub·02:31 PM
DescriptionSeverityWeaknessAffected Software
Jun 23, 2026
CVE Published
via MITRE·04:43 PM
Data Sourced
via MITRE·04:43 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:18 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-54016?

The severity of CVE-2026-54016 is classified as medium with a score of 4.3.

2

What type of vulnerability is CVE-2026-54016?

CVE-2026-54016 is a Broken Object Level Authorization (BOLA) vulnerability.

3

How can CVE-2026-54016 be exploited?

CVE-2026-54016 can be exploited by an authenticated user manipulating the `search_knowledge_files` tool when no knowledge bases are attached to the selected model.

4

What software is affected by CVE-2026-54016?

CVE-2026-54016 affects the Open WebUI software specifically when using the pip package.

5

How do I fix CVE-2026-54016?

To fix CVE-2026-54016, ensure that proper authorization controls are implemented for the `search_knowledge_files` tool.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203