mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[GH-ISSUE #18387] issue: Stored XSS in Artifact Rendering #18581
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 @xqrt on GitHub (Oct 17, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/18387
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
all
Ollama Version (if applicable)
No response
Operating System
n/a
Browser (if applicable)
all
Confirmation
README.md.Expected Behavior
Summary
Submitting custom Python code through the code interpreter text box enables malicious HTML rendering in the Artifact section, creating a stored XSS vulnerability.
Details
Finding/steps
Payload Delivery: An attacker embeds an XSS payload into Python code and saves it as an artifact.
Chat Sharing: The attacker shares the chat link containing the payload with victims.
Triggering the Payload: Victims must clone the chat to expose the Artifact section. Upon viewing the artifact, the payload executes automatically.
Risk
Session Hijacking: Steals session cookies/tokens, enabling account impersonation.
Privilege Escalation: Compromising admin accounts could allow attackers to:
- Modify frontend/backend configurations in Open WebUI.
- Deploy additional malicious scripts or exfiltrate sensitive data.
- Escalate attacks to internal systems depending on admin permissions. (configuration dependent)
Recommendations
PoC
Input the given python code into the prompt and wait for the model to rewrite it. In the rewritten code section click Save and go to the (...) on the top right and click Artifact. When the side panel opens the XSS poc gets triggered.
used python prompt.
POC is from a local deployment, but it was verified with other models on a Kubernetes deployment.
Impact
This allowed to execute malicious JavaScript and steal sessions cookies from victims, essentially leading to vertical and horizontal privilege escalation attacks.
Actual Behavior
No response since April so disclosing this.
Steps to Reproduce
Logs & Screenshots
Additional Information
No response
@Classic298 commented on GitHub (Oct 17, 2025):
You should report vulnerabilities as described in the SECURITY.md file, not as an issue.
https://github.com/open-webui/open-webui/security
And second: bascially this exact issue is known already and has been reported before in these reports:
@xqrt commented on GitHub (Oct 17, 2025):
it is but 6months no response