Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Network vector because exploitation targets the HTTP chat completion API; PR:L because any authenticated account suffices; C:L because only file metadata, not content, is directly exposed.
Primary rating from Vendor (https://github.com/open-webui/open-webui).
CVSS VectorVendor: https://github.com/open-webui/open-webui
Lifecycle Timeline
2DescriptionCVE.org
Summary
Open WebUI has a Broken Object Level Authorization (BOLA) vulnerability in the builtin search_knowledge_files tool.
When native function calling is enabled and the selected model has no attached knowledge bases, an authenticated user can call search_knowledge_files with an arbitrary knowledge_id. 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/open_webui/tools/builtin.py
Affected function:
async def search_knowledge_files(
query: str,
knowledge_id: Optional[str] = None,
count: int = 5,
skip: int = 0,
__request__: Request = None,
__user__: dict = None,
__model_knowledge__: Optional[list[dict]] = None,
) -> str:In the "No attached knowledge" branch, when knowledge_id is provided, the function directly calls:
result = await Knowledges.search_files_by_id(
knowledge_id=knowledge_id,
user_id=user_id,
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:
if not (
user_role == "admin"
or knowledge.user_id == user_id
or await AccessGrants.has_access(
user_id=user_id,
resource_type="knowledge",
resource_id=knowledge.id,
permission="read",
user_group_ids=set(user_group_ids),
)
):
continueThe sibling function query_knowledge_files also performs the same authorization check before using user-supplied knowledge base IDs.
The underlying method Knowledges.search_files_by_id() receives user_id, but it does not enforce authorization for the provided knowledge_id. 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
readpermission for the target knowledge base inAccessGrants. - The attacker knows the target
knowledge_id. - 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
- Create a private or restricted knowledge base as the victim user.
- Upload one or more files to that knowledge base.
- Confirm that the attacker user does not have access to the knowledge base.
- As the attacker user, send a chat completion request with native function calling enabled:
{
"stream": true,
"model": "gpt-4o-mini",
"params": {
"function_calling": "native"
},
"messages": [
{
"role": "user",
"content": "Please use the search_knowledge_files tool with knowledge_id \"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
search_knowledge_files 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 knowledge_id 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 view_knowledge_file, 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 knowledge_id.
Suggested Fix
Add the same authorization check used in query_knowledge_files before calling Knowledges.search_files_by_id():
if knowledge_id:
knowledge = await Knowledges.get_knowledge_by_id(knowledge_id)
if not knowledge or not (
user_role == "admin"
or knowledge.user_id == user_id
or await AccessGrants.has_access(
user_id=user_id,
resource_type="knowledge",
resource_id=knowledge.id,
permission="read",
user_group_ids=set(user_group_ids),
)
):
return json.dumps({"error": f"Access denied to knowledge base {knowledge_id}"})
result = await Knowledges.search_files_by_id(
knowledge_id=knowledge_id,
user_id=user_id,
filter={"query": query},
skip=skip,
limit=count,
)As defense in depth, authorization should also be enforced or safely wrapped around Knowledges.search_files_by_id() so that future callers cannot accidentally bypass access control.
AnalysisAI
Broken Object Level Authorization in Open WebUI's search_knowledge_files builtin tool (versions ≤ 0.9.5) allows any authenticated user to enumerate file metadata from private or restricted knowledge bases they do not own or have permission to access. By sending a crafted chat completion request with native function calling enabled and supplying an arbitrary knowledge_id, an attacker bypasses the AccessGrants permission model entirely, receiving file IDs, filenames, knowledge base names, and timestamps. No KEV listing exists at time of analysis, but a detailed proof-of-concept with full reproduction steps is publicly documented in GitHub Security Advisory GHSA-cx9v-4qj2-jrw6, and a vendor-released patch is available in version 0.9.6.
Technical ContextAI
Open WebUI is a Python-based self-hosted AI chat interface distributed via pip (pkg:pip/open-webui). The vulnerability exists in backend/open_webui/tools/builtin.py within the async function search_knowledge_files. The root cause is CWE-862 (Missing Authorization): in the 'no attached knowledge base' code path, the function directly invokes Knowledges.search_files_by_id(knowledge_id, user_id, ...) with a caller-supplied knowledge_id without first verifying that the caller has read access to that knowledge base. This is an inconsistency - the 'attached knowledge' branch of the same function, as well as the sibling function query_knowledge_files, both perform a three-part authorization check (admin role OR knowledge base ownership OR explicit AccessGrants.has_access() permission via group membership). The underlying Knowledges.search_files_by_id() method receives user_id but does not itself enforce access control on the knowledge_id, meaning authorization responsibility falls entirely on callers - a responsibility this code path omits. Native function calling surfaces the tool directly to the LLM inference pipeline, making the vulnerable path reachable via standard chat API requests.
RemediationAI
Vendor-released patch: Open WebUI 0.9.6. Upgrade the pip package immediately via pip install --upgrade open-webui or pin to open-webui==0.9.6. The fix adds the same authorization gate used by query_knowledge_files before invoking Knowledges.search_files_by_id(), verifying that the requesting user is either an admin, the owner of the target knowledge base, or holds an explicit read permission in AccessGrants. The full advisory and patch details are at https://github.com/open-webui/open-webui/security/advisories/GHSA-cx9v-4qj2-jrw6. If immediate upgrade is not possible, operators should disable native function calling for non-admin users (this prevents the vulnerable tool from being surfaced via the chat API, but removes LLM native tool use entirely), or disable the knowledge builtin tool category in platform settings (trade-off: removes all builtin knowledge search for all users). Restricting chat completion API access to trusted internal users only reduces exposure without disabling functionality. The advisory also recommends defense-in-depth hardening of Knowledges.search_files_by_id() at the data layer so future callers cannot accidentally bypass access control - this should be applied even after patching.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Same weakness CWE-862 – Missing Authorization
View allSame technique Authentication Bypass
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-38526
GHSA-cx9v-4qj2-jrw6