mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[GH-ISSUE #22217] issue: Users can access any uploaded file by using tools #58329
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?
Originally created by @tmcavoy35 on GitHub (Mar 4, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22217
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.8.8
Ollama Version (if applicable)
No response
Operating System
Ubuntu 22.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Users who don't have the necessary permissions, should not be able to access files uploaded by other users.
Actual Behavior
Users can utilise tools to list all files in open-webui's upload directory and then have the model dump the contents of that file into the chat window. This allows a general User to be able to access documents that have been uploaded by other users.
Steps to Reproduce
The way I did it (could probably be done simpler) but using 2 tools. The first one retrieves a list of the files that are in the upload directory of open-webui and return them in the chat window. This gives the user the necessary uuids to then using a second tool, to dump the contents of that file into the response.
Here are the tools I used for this:
find_files.py
`"""
title: List Uploads and Generated Files
description: Lists all files in the Open WebUI upload folder and the generated output folder (/tmp).
version: 1.0
"""
import os
class Tools:
def init(self):
self.upload_dir = "/app/backend/data/uploads"
self.output_dir = "/tmp"
dump_files.py
`"""
title: Dump Uploaded File Content (PDF/DOCX/XLSX/PPTX/Images)
description: Reads a file from uploads and outputs its text content (supports PDF, DOCX, XLSX, PPTX, images via OCR).
requirements: pymupdf, python-docx, openpyxl, python-pptx, pillow, pytesseract
version: 1.1
"""
import os
import fitz # PDF
from docx import Document
from openpyxl import load_workbook
from pptx import Presentation
from PIL import Image
import pytesseract
class Tools:
def init(self):
self.upload_dir = "/app/backend/data/uploads"
self.max_chars = 20000 # safety limit
Logs & Screenshots
Additional Information
No response
@Classic298 commented on GitHub (Mar 4, 2026):
Intended.
Tools are powerful plugins running inside Open WebUI.
They are just python code that runs on your machines.
Normal users should not be given access to tools - henceforth this is also off by default - and the documentation explicitly warns against giving normal users access to tools to allow them to create their own tools since it's basically arbitrary code execution.
Users with access to tools need to be trusted users (i.e. admins or special developers in a group which has permissions, but nobody else).
(FYI tools can do a lot worse things in the wrong hands besides reading files in the uploads directory. Hence: only give access to tools to trusted users. Tools are PLUGINS!)
Read the docs.
@Classic298 commented on GitHub (Mar 4, 2026):
https://docs.openwebui.com/features/extensibility/plugin/tools/
https://docs.openwebui.com/features/extensibility/plugin/