mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-02 06:39:02 -05:00
[PR #12757] [CLOSED] fix: Security - Default prompt permissions to respect user access rights #9809
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/12757
Author: @Classic298
Created: 4/11/2025
Status: ❌ Closed
Base:
dev← Head:dev📝 Commits (5)
95d80ecUpdate __init__.pyebcc838Merge branch 'open-webui:dev' into dev0d4a1ddMerge branch 'open-webui:dev' into deve5e6ac2Update PromptEditor.svelteea537bdUpdate PromptEditor.svelte📊 Changes
2 files changed (+5 additions, -3 deletions)
View changed files
📝
backend/open_webui/__init__.py(+1 -1)📝
src/lib/components/workspace/Prompts/PromptEditor.svelte(+4 -2)📄 Description
fix: Default prompt permissions to respect user access rights
Pull Request Checklist
Pull Request Checklist
devbranchDescription
This PR addresses a security vulnerability where prompts could be unintentionally shared with all users, bypassing access control restrictions. When users create prompts without explicitly setting access control permissions (by not clicking the "Access" button), the system defaults to public access (
null) even when users don't have permission to create public prompts or the admin has disabled public sharing.Vulnerability details:
What is the vulnerability / how to execute the vulnerability:
accessControl = null(public access), unless the user manually, explicitly opens the access-settings when creating a new prompt - in that case, his actual permissions would be loaded and correctly set. If the user never opens the access settings during prompt creation, the prompt is always saved as a public prompt, regardless of public sharing permissions./in the chat interfaceImportant note to maintainer (Tim):
While I've carefully reviewed the changes, I kindly request your additional verification and testing. The scope was intentionally kept narrow to address just the vulnerability without introducing regressions.
Impact:
Based on CVSS, this would likely score as a Medium severity vulnerability due to the unauthorized information disclosure across user boundaries with no special privileges required to exploit.
If you are affected: How to fix?
If you are affected by this here is a fix for affected prompts:
As a user:
Edit all your prompts, open the access settings and ensure it is set to private, then save the prompt.
As an admin:
Edit all the prompts that your users created and check the access settings. If the access settings show "Public", then this prompt is affected by the vulnerability (user did not open access settings during prompt creation). Change it to private and save the edited prompt. Do this for all prompts.
Solution
The fix modifies
PromptEditor.svelteto default prompt access based on user permissions:This ensures the principle of least privilege - users can only share prompts publicly when they explicitly choose to AND have the permission to do so.
Changelog Entry
Changed
Fixed
Security
Additional Information
Related Issue / Discussion
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.