Authorization bypass exists where any verified user is able to update the system-wide tool valves via update_tools_valves_by_id method.
Only admins should be able to update system wide valves.
Reproduction Details
Two users exist in the system - one with admin role & one with user
A tool with a valve has been added by the admin
User has access to the tool or has knowledge of its unique ID
User makes a POST call to /tools/id/{id}/valves/update. The body containing updated valve values
The update succeeds & the tool's valves updated
Logs and Screenshots
N/A
Additional Information
Originally created by @antpyykk-kone on GitHub (Jan 23, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8809
Installed latest release as of writing (0.5.6) via docker via WSL2.
## Environment
- **Open WebUI Version:** 0.5.6
- **Operating System:** Windows 11 (WSL2 - Ubuntu 22.04)
**Confirmation:**
- [x] I have read and followed all the instructions provided in the README.md.
- [x] I am on the latest version of both Open WebUI and Ollama.
- [ ] I have included the browser console logs.
- [ ] I have included the Docker container logs.
- [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.
`POST /tools/id/{id}/valves/update` method
## Expected Behavior:
- Normal users are not able to update tool valves ([per OUI docs - only admins can do this](https://docs.openwebui.com/features/plugin/tools/#valves-and-uservalves---optional-but-highly-encouraged))
## Actual Behavior:
- Any verified user can call the [update_tools_valves_by_id](https://github.com/open-webui/open-webui/blob/4a2792b4dacaac7457fca2c736bc74b44a236771/backend/open_webui/routers/tools.py#L302-L335) & update the system wide tools valves
## Description
**Bug Summary:**
Authorization bypass exists where any verified user is able to update the system-wide tool valves via [update_tools_valves_by_id](https://github.com/open-webui/open-webui/blob/4a2792b4dacaac7457fca2c736bc74b44a236771/backend/open_webui/routers/tools.py#L302-L335) method.
[Only admins should be able to update system wide valves.]((https://docs.openwebui.com/features/plugin/tools/#valves-and-uservalves---optional-but-highly-encouraged))
## Reproduction Details
1. Two users exist in the system - one with admin role & one with user
2. A tool with a valve has been added by the admin
3. User has access to the tool or has knowledge of its unique ID
4. User makes a POST call to `/tools/id/{id}/valves/update`. The body containing updated valve values
5. The update succeeds & the tool's valves updated
## Logs and Screenshots
N/A
## Additional Information
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @antpyykk-kone on GitHub (Jan 23, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8809
Installed latest release as of writing (0.5.6) via docker via WSL2.
Environment
Confirmation:
POST /tools/id/{id}/valves/updatemethodExpected Behavior:
Actual Behavior:
Description
Bug Summary:
Authorization bypass exists where any verified user is able to update the system-wide tool valves via update_tools_valves_by_id method.
Only admins should be able to update system wide valves.
Reproduction Details
/tools/id/{id}/valves/update. The body containing updated valve valuesLogs and Screenshots
N/A
Additional Information
@tjbck commented on GitHub (Jan 23, 2025):
Addressed with
8fc5532e2f