open-webui
Affected
- introduced
0.10.0, fixed0.11.1(ecosystem)
Fixed versions
0.11.1
Fix
- Fixed version
0.11.1pip install --upgrade open-webui==0.11.1
Advisory
Also known as: CVE-2026-87997, GHSA-3pf7-q2g3-wj28
Open WebUI: Any authenticated user can inject chats into another user's folder via chat completions
Summary
The chat-completions endpoint reads a folder id out of the request body and saves the newly created chat into that folder without checking that the caller is allowed to write there. Any authenticated user who knows a folder's id can put a chat of their own into another user's folder, including a shared folder where they hold read-only access and a folder they have no access to at all. The chat then shows up in that folder for everyone who can read it, under a title and with content the attacker controls. The dedicated chat-creation and chat-move endpoints already enforced this check, the chat-completions path did not.
Preconditions
ENABLE_FOLDERS=true, USER_PERMISSIONS_FEATURES_FOLDERS=true).Impact
The integrity of folder contents. An attacker who cannot write to a folder can place chats into it, and every member with read access, the owner included, sees the entry with the attacker's display name and a title the attacker can change to arbitrary text at any time. Members can also open the injected chat and read its messages. In a workspace where a shared folder is treated as trusted, that is a usable surface for planting misleading or phishing content under another team's nose.
Nothing is disclosed to the attacker and nothing existing is altered. Writing into a folder grants no read access to it, so the attacker still cannot list or open the folder's other chats, and no data belonging to other users can be modified or deleted through this path. Availability is unaffected.
Fix
Fixed in 0.11.1 by https://github.com/open-webui/open-webui/pull/28366. Chat creation, chat moves and the chat-completions creation path now share a single folder write-access check, so a folder id the caller cannot write to is rejected everywhere a chat's folder can be set. Upgrading to 0.11.1 resolves it completely, with no configuration change required.
Root cause
Affected component: the chat-completions handler in backend/open_webui/main.py, reached through POST /api/chat/completions and POST /api/v1/chat/completions. Affected setup: every deployment on 0.10.0 through 0.11.0 with folders enabled.
The completions handler gained its own chat-creation branch, which copied the client-supplied folder id into the chat it saved. The ownership and shared-write check lived as duplicated inline code inside the two chat routers rather than in one shared helper, so a third place that learned to set a folder id inherited none of it. Separately, folder listings had been changed to return a folder's chats across all owners so that shared folders work at all, which turned a write that used to be invisible to everyone into one the whole folder can see.
Proof of concept
Reproduced on a running instance at 0.11.0 with three accounts: one administrator and two ordinary users, one acting as victim and one as attacker.
POST /api/v1/chats/new with the victim's folder id. Rejected with 404, which is the pre-existing guard working.POST /api/chat/completions with parent_id: null, no chat id, and the victim's folder id in the body. Accepted.Repeating step 3 with the attacker granted read-only access to a shared folder also succeeds on 0.11.0. On 0.11.1 both variants are rejected with 404 and the folder stays empty, while a member holding write access can still create chats there as intended.
The three accounts and the folder were created through the normal API. Nothing was written directly to the database.
Credits
whyiug, for reporting the missing folder write-access check on the chat-completions creation path.
Medium Basis: CVSS v3 score 4.3, vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
0.10.0, fixed 0.11.1 (ecosystem)0.11.1
0.11.1pip install --upgrade open-webui==0.11.1Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: PyPA Advisory Database · CC BY 4.0