Skip to main content
CVE Vulnerability Database

CVE-2024-7044: Open WebUI Stored XSS Vulnerability

CVE-2024-7044 is a stored XSS vulnerability in Open WebUI's chat file upload feature that allows attackers to inject malicious scripts. This post covers the technical details, affected versions, security impact, and mitigation steps.

Published:

CVE-2024-7044 Overview

CVE-2024-7044 is a Stored Cross-Site Scripting (XSS) vulnerability in the chat file upload functionality of open-webui/open-webui version 0.3.8. An attacker uploads a file containing malicious content that executes JavaScript in a victim's browser when the file is accessed through a URL or shared chat. Successful exploitation can lead to user data theft, session hijacking, malware distribution, and phishing attacks. The flaw is classified under [CWE-79] Improper Neutralization of Input During Web Page Generation.

Critical Impact

Attackers with low-privileged accounts can persistently inject JavaScript into shared chats, compromising any user who views the crafted content.

Affected Products

  • Open WebUI 0.3.8
  • Deployments exposing chat file upload and shared chat functionality
  • Multi-user Open WebUI instances where chats or files are shared across accounts

Discovery Timeline

  • 2025-03-20 - CVE-2024-7044 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-7044

Vulnerability Analysis

Open WebUI accepts file uploads within chat sessions and renders portions of that file content back to users who open the chat or a shared link. The application fails to properly neutralize active script content before delivering it to the browser. When a victim opens the shared chat or the file's URL, the browser executes the attacker-controlled JavaScript in the context of the Open WebUI origin.

Because the payload persists on the server, this is a stored XSS rather than a reflected variant. The CVSS vector indicates a scope change, reflecting that code executing in the Open WebUI origin can reach resources beyond the vulnerable component, including the victim's authenticated session state.

Root Cause

The root cause is missing or insufficient output encoding and content sanitization on file content rendered inside chat views. User-supplied file data is treated as trusted markup rather than untrusted text, allowing embedded <script> tags, event handlers, or other active content to reach the DOM intact.

Attack Vector

An authenticated attacker with low privileges uploads a file containing JavaScript payloads through the chat interface. The attacker then shares the chat link, or induces a victim to open the resulting URL. When the victim's browser renders the chat, the injected script executes with the victim's session context. The attacker can exfiltrate cookies, session tokens, and API keys, issue authenticated requests, or serve secondary phishing prompts inside the trusted Open WebUI interface.

No verified public exploit code is available. See the Huntr Bug Bounty Report for the original disclosure.

Detection Methods for CVE-2024-7044

Indicators of Compromise

  • Uploaded chat files containing <script> tags, javascript: URIs, or DOM event handlers such as onerror= and onload=
  • Outbound requests from user browsers to unfamiliar domains immediately after opening a shared chat
  • Unexpected session token or cookie access patterns in Open WebUI application logs
  • Newly created chats or shared links from low-privileged accounts that receive disproportionate traffic

Detection Strategies

  • Inspect stored chat file content for HTML or JavaScript syntax that should not appear in expected file types
  • Correlate file upload events with subsequent shared-link access from multiple distinct user sessions
  • Monitor browser Content Security Policy (CSP) violation reports originating from Open WebUI pages
  • Review reverse proxy or web application firewall logs for responses containing user-supplied script content

Monitoring Recommendations

  • Enable verbose logging on chat upload and share endpoints, including uploader identity and file hash
  • Alert on any Open WebUI response containing executable script blocks sourced from user-uploaded files
  • Track anomalous authenticated API calls that follow shortly after a user opens a shared chat

How to Mitigate CVE-2024-7044

Immediate Actions Required

  • Upgrade Open WebUI to a release later than 0.3.8 that addresses the file upload sanitization issue
  • Restrict chat sharing and file upload permissions to trusted users until patched
  • Invalidate active sessions and rotate API keys for any account that opened untrusted shared chats
  • Review the Huntr Bug Bounty Report for vendor remediation status

Patch Information

No vendor advisory URL is listed in the NVD record for CVE-2024-7044. Administrators should track the Open WebUI project releases and apply the first fixed version above 0.3.8. Confirm that the deployed version includes updated output encoding and file content sanitization logic before restoring normal sharing permissions.

Workarounds

  • Deploy a strict Content Security Policy that blocks inline scripts and restricts script sources to trusted origins
  • Place Open WebUI behind a web application firewall with rules that strip active HTML content from uploaded files
  • Disable public chat sharing features and require authenticated access for viewing chats containing uploads
  • Enforce file type validation and reject files whose content does not match declared MIME types
bash
# Example CSP header applied at a reverse proxy to limit XSS impact
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'";

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.