mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-15 21:19:39 -05:00
[PR #24811] [CLOSED] fix: enforce file ownership on chat-completion image_url file ids (IDOR) #131528
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/24811
Author: @Classic298
Created: 5/16/2026
Status: ❌ Closed
Base:
dev← Head:fix/chat-image-url-file-id-idor📝 Commits (1)
4aead34fix: enforce file ownership on chat-completion image_url file ids (IDOR)📊 Changes
2 files changed (+13 additions, -4 deletions)
View changed files
📝
backend/open_webui/utils/files.py(+10 -1)📝
backend/open_webui/utils/middleware.py(+3 -3)📄 Description
get_image_base64_from_url resolved a user-supplied image_url string as a file id via Files.get_file_by_id with no ownership check, so any verified user could read another user's uploaded image by passing its UUID in a /api/chat/completions request. Thread the authenticated user through convert_url_images_to_base64 and apply the same owner/admin/has_access_to_file check the file routes already use.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.