Summary
Open WebUI's web retrieval processing endpoint allows any authenticated user to overwrite arbitrary document collections without verifying ownership or write permissions.
By supplying a chosen collection_name with overwrite enabled, an attacker can delete and replace another user's collection data, leading to loss or corruption of stored content.
Affected context
The vulnerability appears in Open WebUI deployments that expose the POST /api/v1/retrieval/process/web endpoint.
It is relevant when:
- Multiple users or tenants share the same Open WebUI instance
- Collections in the vector database are differentiated by logical names rather than strictly enforced access controls
- Clients can freely provide
collection_nameand rely on the overwrite behavior
In these circumstances, a user can target collections they do not own if the server does not enforce authorization on the requested collection.
Exploit preconditions
- Attack surface: HTTP API endpoint
POST /api/v1/retrieval/process/web - Required access: Ability to call the endpoint (typically an authenticated user session or any actor with API access)
- Trigger point: Supplying a
collection_namethat references a victim's collection and leavingoverwriteasTrue(default) or explicitly setting it toTrue - Why exploitation is possible: The handler does not perform an authorization check to confirm that the calling principal owns or has write access to the specified collection before calling
VECTOR_DB_CLIENT.delete_collection()and writing new data
Why this happens
The bug stems from a missing authorization decision on a sensitive resource operation, aligning with CWE-862: Missing Authorization.
The endpoint trusts the user-supplied collection_name and relies solely on that identifier to determine which collection to manipulate, without mapping it to a specific owner or access control policy.
As a result, the system executes deletion and rewrite operations on any referenced collection, assuming that the caller is allowed to perform them.
This pattern reflects a broader access control design issue: authorization is applied at the coarse "user can call this endpoint" level, but not at the finer "user can modify this specific collection" level.
Potential impact
- Loss of data: Attackers may delete or overwrite collections belonging to other users, leading to permanent loss of stored documents and embeddings.
- Data corruption: Collections can be replaced with attacker-controlled content, degrading retrieval quality or causing misleading responses.
- Integrity issues across tenants: In multi-user or multi-tenant deployments, one tenant may impact another tenant's collections, breaking isolation guarantees.
- Operational disruption: Critical collections used in workflows or automated pipelines can be wiped or polluted, impacting automation and downstream systems.
- Security and compliance concerns: Uncontrolled modification of stored content may undermine auditability and trust, especially in regulated environments.
General mitigation guidance
Mitigation focuses on enforcing resource-level access control and constraining how collection identifiers are used:
- Introduce ownership binding between collections and users or tenants, ensuring every collection is associated with a specific principal or group.
- Apply authorization checks before destructive operations, such as delete or overwrite, verifying that the caller has explicit write privileges to the target collection.
- Prefer server-side resolution of collection identifiers, deriving allowed collection names from the authenticated user's context instead of trusting arbitrary
collection_namevalues from the client. - Implement least-privilege roles for API access, narrowing which endpoints and operations each role can invoke.
- Add soft-delete or versioning strategies for collections where feasible, so accidental or malicious deletions can be detected and rolled back.
- Incorporate centralized access control policies (e.g., middleware or policy engine) to avoid scattered, ad-hoc authorization logic and reduce the chance of omissions.
How teams detect issues like this
Effective detection combines code-level analysis with runtime observability:
- Use static analysis and code review checklists to flag endpoints that perform create, update, or delete operations on shared resources without explicit authorization logic.
- Search for patterns where user-controlled identifiers (such as
collection_name) are passed directly into storage or vector database operations, and verify that an access control decision exists nearby. - Enforce API-level security policies (e.g., through middleware, interceptors, or policy engines) that require resource-level checks for sensitive operations.
- At runtime, monitor logs for suspicious behaviors such as:
- Frequent overwrites of collections by non-typical users
- Access patterns where one account consistently modifies collections associated with different identities
- Consider automated tests or security regression tests that simulate cross-user access attempts to collections and verify they are denied.

