[GH-ISSUE #8809] Authorization Bypass in Tool Valves Update Endpoint #53938

Closed
opened 2026-05-05 15:35:34 -05:00 by GiteaMirror · 1 comment
Owner

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:

  • I have read and followed all the instructions provided in the README.md.
  • 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.
  • 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:

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

  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

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
Author
Owner

@tjbck commented on GitHub (Jan 23, 2025):

Addressed with 8fc5532e2f

<!-- gh-comment-id:2610665692 --> @tjbck commented on GitHub (Jan 23, 2025): Addressed with 8fc5532e2fb70ee5b82aeb286cdde0995c9c8657
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#53938