CVE-2026-91127: File Viewer: DOM XSS via unsafe hyperlink schemes in the legacy DOC renderer

Published Sep 18, 2026
·
Updated

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.

Other sources

File Viewer is a browser-native viewer for Office, PDF, CAD, archive, and other files in private and internal web applications. Prior to @file-viewer/doc 2.3.1 and msdoc-viewer 0.2.2, the legacy DOC renderer emitted document-controlled hyperlink targets into generated HTML after character escaping but without restricting URL schemes. A crafted legacy DOC file could place javascript:, vbscript:, data:, or another unsafe scheme in a rendered link, and script could execute in the embedding application's origin when a user clicked the link. The fix blocks external document links by default, allows only HTTP(S), mail, telephone, safe relative URLs, and internal bookmarks when external links are explicitly enabled, and applies mount-boundary sanitization as defense in depth. This issue is fixed in @file-viewer/doc 2.3.1 and msdoc-viewer 0.2.2.

MITRE

Affected Software

4 affected componentsFixes available
npm/@file-viewer/doc<2.3.1
npm/msdoc-viewer<0.2.2
npm/msdoc-viewer<=0.2.1
0.2.2
npm/@file-viewer/doc<=2.3.0
2.3.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/msdoc-viewer to a version that resolves this vulnerability.

    Fixed in 0.2.2
  2. Upgrade

    Upgrade npm/@file-viewer/doc to a version that resolves this vulnerability.

    Fixed in 2.3.1
  3. Upgrade

    Upgrade @file-viewer/doc to a version that resolves this vulnerability.

    Fixed in 2.3.1
  4. Upgrade

    Upgrade msdoc-viewer to a version that resolves this vulnerability.

    Fixed in 0.2.2

Event History

Sep 18, 2026
CVE Published
via MITRE·05:18 PM
Data Sourced
via MITRE·05:18 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·05:19 PM
Data Sourced
via GitHub·05:19 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using the legacy DOC renderer in @file-viewer/doc before 2.3.1 or msdoc-viewer before 0.2.2 are exposed when they render attacker-controlled or otherwise untrusted legacy DOC files in a browser.

2

What must an attacker do to exploit it?

An attacker must provide a crafted legacy DOC file containing a hyperlink with an unsafe URL scheme, such as javascript:, vbscript:, or data:. A user must click the rendered link for script to execute in the embedding application's origin.

3

Are external document links enabled by default after the fix?

No. The fix blocks external document links by default. When external links are explicitly enabled, only HTTP(S), mail, telephone, safe relative URLs, and internal bookmarks are allowed.

4

How can exposure be remediated?

Upgrade @file-viewer/doc to 2.3.1 or later, or msdoc-viewer to 0.2.2 or later. The fixed versions restrict permitted hyperlink schemes and add mount-boundary sanitization.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203