Open WebUI's Mass Assignment via Pydantic extra='allow' Allows Creating Folders in Other Users' Accounts
Mass Assignment via Pydantic extra='allow' Allows Creating Folders in Other Users' Accounts
Affected Component
Folder creation endpoint and form model:
backend/open_webui/models/folders.py(lines 72-77,FolderFormwithextra='allow')backend/open_webui/models/folders.py(lines 95-106,insert_new_folderdict construction)backend/open_webui/routers/folders.py(line 119,create_folderendpoint)
Affected Versions
Current main branch (commit 6fdd19bf1) and likely all versions since FolderForm adopted extra='allow'.
Description
FolderForm uses model_config = ConfigDict(extra='allow'), which permits arbitrary fields to pass through Pydantic validation and be included in model_dump(exclude_unset=True). In insert_new_folder, the server-assigned user_id is placed at the start of the dict and then overwritten by the spread of form data:
# models/folders.py:95-106
folder = FolderModel(
**{
'id': id, # server
'user_id': user_id, # server — overwritten below
**(form_data.model_dump(exclude_unset=True) or {}), # user-controlled (extra='allow')
'parent_id': parent_id,
'created_at': int(time.time()),
'updated_at': int(time.time()),
}
)
Because FolderModel declares user_id: str as a real field (not just a form extra), any attacker-supplied user_id in the POST body is accepted by the model and persisted on the Folder row.
Attack Scenario
- Attacker discovers a victim's user ID. User UUIDs commonly leak via the user search endpoint (
GET /api/v1/users/search, intentionally accessible to verified users for sharing UI), shared chat metadata, or channel member lists. - Attacker sends:
POST /api/v1/folders/ { "name": "Important: Click here", "user_id": "<victim_user_id>", "meta": {"icon": "warning"}, "data": {...} } - Pydantic accepts the extra
user_idfield (allowed byextra='allow'). insert_new_folderspreads the form data over the server-set'user_id': user_id, overwriting it with the attacker's value.- The
Folderrow is persisted withuser_id = <victim_user_id>. - The victim sees the attacker-planted folder in their UI on next load because
GET /api/v1/folders/filters by the viewer's ownuser_id.
The attacker can repeat this to plant multiple folders, use crafted name values for phishing ("Click here to recover account" / "Security alert"), and abuse the meta and data fields to add visual elements that further mimic legitimate content.
Impact
- Unauthorized write into victim's folder tree
- Phishing surface: attacker-controlled
name,meta, anddatarender in the victim's UI in a trusted context - DoS / spam: attacker can flood a victim with arbitrary folders; victim must manually delete each one
- Attacker cannot read the folder back — all read paths filter by the caller's own
user_id— so confidentiality is preserved, but integrity and trust are compromised
Preconditions
- Attacker must have an authenticated account with
features.folderspermission (default for all users) - Attacker must know or guess the victim's user UUID (obtainable through various non-sensitive endpoints)
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | open-webui | < 0.9.0 | 0.9.0 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:N- Weakness (CWE)
CWE-862- Platform
- Python (PyPI)
- Package
open-webui- Disclosed
- 08.05.2026
- Updated
- 11.10.2026 14:18
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-2735 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-hr43-rjmr-7wmm - CC BY 4.0
Vulnerability history: open-webui
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 161
- First → latest
- 08.2024 09.2026
- Without a fix
- 11
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- High 77
- Medium 75
- Low 8
Disclosures per year
- 2024: 3
- 2025: 21
- 2026: 137
-
Open WebUI's Mass Assignment via Pydantic extra='allow' Allows Creating Folders in Other Users' Accounts this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.