mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[GH-ISSUE #21799] issue: User can inject anything into the model prompt by intercepting the variables from the user side #58239
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 @jegranado on GitHub (Feb 23, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21799
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.8.5
Ollama Version (if applicable)
No response
Operating System
Ubuntu 22.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
The variables that collect user context from the browser (CURRENT_DATETIME, USER_EMAIL, CURRENT_TIMEZONE...) that are sent as "variables" in the payload to /api/chat/completions, if tampered with via traffic interception, should be validated in the server side for sanity (is the email formatted as an email? is the timezone a real timezone? id the current datetime a real datetime? is the user_name or user_location less than X lenght ? )
Actual Behavior
The variables that collect user context from the browser (CURRENT_DATETIME, USER_EMAIL, CURRENT_TIMEZONE...) that are sent as "variables" in the payload to /api/chat/completions can be used to inject any content into the models prompt, especially if the model refers to the variables explicitly.
Steps to Reproduce
Use any tool to intercept the requests and override any of these variables with malicious content, then observe the model behaving accordingly.
Logs & Screenshots
Additional Information
No response
@Classic298 commented on GitHub (Feb 23, 2026):
So, ok, this is interesting I'll have to say.
But what's the issue here? You'll prompt inject your own.... your own chat. You can't cause harm to anyone but yourself.
So i don't see why a missing valdiation here in this scenario is an "issue". Am i missing anything?
Btw in case you are not aware of it, for future reference, open webui allows responsible disclosure via GitHub reports: https://github.com/open-webui/open-webui/security
@jegranado commented on GitHub (Feb 23, 2026):
thanks for the heads-up for the sec reports route
for a single user environment, I agree with you, not much harm
but it is an issue when serving a platform with clients, I'd say
@Classic298 commented on GitHub (Feb 23, 2026):
@jegranado why is it an issue in a multi user environment?