mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-30 17:25:30 -05:00
[PR #23635] [CLOSED] fix: block knowledge-bases meta-collection enumeration and enforce KB read access on query endpoints #66148
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23635
Author: @Classic298
Created: 4/12/2026
Status: ❌ Closed
Base:
dev← Head:fix/kb-meta-collection-enumeration📝 Commits (3)
df39e3ffix: block knowledge-bases meta-collection enumeration and enforce KB read access on query endpoints4fa3229merge: resolve conflicts with upstream async DB migrationf561d1afix: adapt _validate_collection_access to async DB layer📊 Changes
1 file changed (+53 additions, -4 deletions)
View changed files
📝
backend/open_webui/routers/retrieval.py(+53 -4)📄 Description
The _validate_collection_access function only blocked user-memory-* and file-* patterns, allowing any authenticated user to query the knowledge-bases meta-collection to discover all KB UUIDs, names, and descriptions across the entire instance.
Blocks access to the knowledge-bases meta-collection for non-admins. Also enforces KB ownership and AccessGrants read permission checks on KB-ID collections via the query/doc and query/collection endpoints.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.