# GHSA-XCFM-M684-6VFM: Stored XSS in Markdown rendering

- Database: GitHub
- Severity: CVSS 7.1 (High)
- Published: 2026-08-20
- Modified: 2026-08-20

## Affected versions

- @file-viewer/renderer-text (npm): from 2.0.11, through 2.2.8

## Description

### Summary

`@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.

## References

- https://github.com/flyfish-dev/file-viewer/security/advisories/GHSA-xcfm-m684-6vfm

Page: https://cve.now/GHSA-XCFM-M684-6VFM

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
