# GHSA-3753-M2X2-Q623: File Viewer: DOM XSS via unsafe hyperlink schemes in the legacy DOC renderer

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-09-18
- Modified: 2026-09-18

## Tracked as

- [CVE-2026-91127](https://cve.now/CVE-2026-91127.md): File Viewer: DOM XSS via unsafe hyperlink schemes in the legacy DOC renderer

## Affected versions

- @file-viewer/doc (npm): fixed in 2.3.1
- msdoc-viewer (npm): fixed in 0.2.2

## Description

### Summary

Before 2.3.1, the legacy `.doc` renderer emitted document hyperlink targets after HTML escaping but without a URL-scheme allowlist. A crafted `.doc` could therefore render a live `javascript:`, `vbscript:`, `data:`, or similarly unsafe link. Script could execute in the embedding origin if a viewer clicked it.

### Impact

Applications rendering untrusted legacy `.doc` files with `@file-viewer/doc` or the `msdoc-viewer` compatibility package could expose their origin to attacker-controlled script after link interaction.

### Fix

Version 2.3.1 centralizes link handling, removes control-character and scheme confusion, blocks external document links by default, and in explicit allow mode accepts only HTTP(S), mail, telephone, safe relative URLs, and internal bookmarks. The renderer output is safe before mounting, with mount-boundary sanitization as defense in depth. The `msdoc-viewer` compatibility release containing the fix is 0.2.2.

Thanks to @shashank420 for responsibly reporting this issue.

## References

- https://github.com/flyfish-dev/file-viewer/security/advisories/GHSA-3753-m2x2-q623
- https://github.com/flyfish-dev/file-viewer/commit/ef045680f8d9830a3eee9612f7df46a734361b07
- https://github.com/flyfish-dev/file-viewer
- https://github.com/flyfish-dev/file-viewer/releases/tag/v2.3.1

Page: https://cve.now/GHSA-3753-M2X2-Q623

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