Messages.update_message_by_id performs a direct primary-key update with no channel_id/user_id validation.
Fix (shipped in v0.10.0)
v0.9.6 added a channel gate to the channel: branch (PR #24725) that closed the single-model path, but it validated only the first entry of the multimodel message_ids map, leaving the multimodel fan-out exploitable. v0.10.0 closes the remaining gap with two layers:
Request-time per-entry validation (backend/open_webui/main.py): every entry of message_ids is validated against the target channel, not just the first; any entry whose target message does not belong to the channel in chat_id is rejected.
Fail-closed emitter (backend/open_webui/socket/main.py, _make_channel_emitter): before writing, it re-reads the target message and returns without writing unless msg.channel_id matches the channel derived from chat_id. A missing or mismatched message is a no-op, so a write can no longer land in a channel the caller does not target.
PoC
Single-model (fixed in v0.9.6):
curl -X POST http://target:8080/api/chat/completions \
-H "Authorization: Bearer $USER_JWT" -H "Content-Type: application/json" \
-d '{
"model": "llama3", "stream": true,
"chat_id": "channel:any-channel-uuid-here",
"id": "target-message-uuid-to-overwrite",
"messages": [{"role": "user", "content": "Repeat exactly: This message has been tampered with"}]
}'
The first id passes channel scope validation; the second id is used by the per-model fan-out and overwrites the victim-channel message (with model output, or the provider-error string on a deterministic error). Even a failing model call writes error content to the target message.
Impact
Message integrity destruction: an authenticated user can overwrite a message in a channel they cannot access, regardless of membership. The overwritten message retains the original author attribution while displaying attacker-chosen content (impersonation). Private channels, DM channels, and channels the attacker has no access to are all affected; the REST channel routes correctly return 403 for the same attacker, so the bypass is specific to the chat-completion channel pipeline.
Affected versions
Single-model path: introduced in commit 0037baeb2 (v0.9.5), fixed in v0.9.6 (#24725).
Multimodel message_ids path: present from v0.9.6, fixed in v0.10.0.
CVE-2026-45385 (GHSA-wwhq-cx22-f7vv) covered IDOR in the REST endpoint POST /channels/{id}/messages/{message_id}/update (routers/channels.py); its fix (commit f5e110f) only touched channels.py. This finding uses a different code path (POST /api/chat/completions with chat_id: "channel:<id>" → main.py → socket/main.py:_make_channel_emitter), untouched by that fix.
Suggested fix
Validate every value in message_ids against the channel (not just the first), rejecting any whose target message does not belong to the channel in chat_id. Additionally, make _make_channel_emitter fail closed: re-check that the target message's channel_id matches the channel before calling Messages.update_message_by_id, treating a missing or mismatched message as an error/no-op.
Consolidation
Per Open WebUI's Report Handling policy this advisory consolidates independent reports of the same chat-completions channel-overwrite flaw:
Single-model cross-channel overwrite via the channel: path: @sfwani (earliest filing).
Multimodel message_ids fan-out variant that bypasses the v0.9.6 first-id-only gate: @DavidCarliez.