Summary
Open WebUI models can store arbitrary meta.knowledge entries that are later trusted as an authorization source without verifying file ownership or access rights.
A malicious user who can manage models may attach another user's file ID to their model metadata and subsequently read or delete that private file when certain tools or endpoints are used.
Affected context
The vulnerability occurs in Open WebUI deployments where workspace models can be created, updated, or imported by users and where the application relies on meta.knowledge entries as an authorization source.
It is relevant when multiple users share a deployment and files are stored with identifiers that can be referenced in model metadata.
The issue manifests specifically in flows that use the built-in view_file tool and the has_access_to_file() model branch for authorizing access to file content and deletion operations.
Exploit preconditions
- Attack surface: Model management and file access APIs within a shared Open WebUI instance.
- Required access: Ability to create, update, or import workspace models and knowledge metadata; presence of target file IDs from other users (e.g., via guessing, enumeration, or leakage).
- Trigger point: Attaching another user's file ID to
meta.knowledgeentries of typefile, then invokingview_fileor file content/delete endpoints that rely on the model-based authorization path. - Why exploitation is possible: The application treats model metadata as a proof of authorization for file access and deletion without validating that the requesting user owns or is permitted to read the referenced file.
Why this happens
At its core, this is an authorization logic flaw where a secondary data source (model metadata) is incorrectly treated as an authoritative access control mechanism.
Instead of verifying file ownership or checking user-file relationships via a consistent authorization layer, the code path trusts meta.knowledge entries of type file to grant read and delete capabilities.
This maps to CWE-285: Improper Authorization and CWE-284: Improper Access Control, as access decisions are made based on user-controlled metadata rather than validated permissions, allowing one user to act on another user's resources.
Potential impact
- A malicious user may read private files belonging to other users.
- A malicious user may delete or otherwise remove other users' files from the system.
- Sensitive data stored in Open WebUI may be exposed, including prompts, datasets, or configuration files.
- Compromise of confidentiality and integrity of user content within a shared AI workspace.
General mitigation guidance
Mitigation generally centers on enforcing robust, centralized authorization checks for all file-related operations and ensuring that metadata cannot be used as a stand-in for access control.
Useful patterns include:
- Binding file access and delete operations to a canonical access control layer that validates the requesting user's relationship to the file (owner, group, role).
- Treating model metadata as advisory information only, never as proof of authorization, and validating any referenced identifiers against server-side permissions.
- Implementing strict reference checks so that when a model references a file ID, the system verifies that the current user can legitimately read or modify that file.
- Applying least-privilege defaults for model management capabilities and separating model-edit permissions from cross-user file management rights.
How teams detect issues like this
Detection can focus on both code-level and runtime indicators:
- Static analysis or manual code review that flags authorization decisions made using user-supplied metadata rather than trusted identity and permission stores.
- Examination of routes and tools (e.g.,
view_file, file content, file delete endpoints) to confirm they consistently consult a centralized permission model. - Logging and monitoring for suspicious patterns of cross-user file access, such as one user accessing or deleting many files they did not create.
- Use of automated security testing tools that attempt to manipulate resource identifiers in model metadata and verify whether unauthorized file operations are permitted.

