Skip to main content
Menu
Advisories

Stored XSS in Markdown rendering

GHSA-XCFM-M684-6VFMPublished Updated GitHub

Description

@file-viewer/renderer-text before 2.2.9 inserted Marked output directly into the embedding document. Marked intentionally preserves raw HTML, so a crafted Markdown file could execute event handlers or active SVG/HTML in the host application origin.

Impact

Applications that preview untrusted or third-party Markdown files may expose authenticated users to stored cross-site scripting, same-origin API abuse, data disclosure, and page modification. Nested archive or attachment preview paths are also affected when they route Markdown into this renderer.

Fix

Version 2.2.9 sanitizes rendered Markdown HTML with DOMPurify before insertion and hardens new-window links with noopener noreferrer. Chromium regression coverage verifies that raw HTML payloads do not execute.

Credit to @uforever for reporting this issue.

Affected versions

References

GitHub · flyfish-dev/file-viewer