GHSA-3753-m2x2-q623: XSS

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.

Affected Software

2 affected componentsFixes available
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 (legacy .doc renderer) / msdoc-viewer compatibility package to a version that resolves this vulnerability.

    Fixed in 2.3.1
  4. Upgrade

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

    Fixed in 0.2.2
  5. Compensating control

    Use mount-boundary sanitization as defense in depth for rendered untrusted legacy .doc files.

Event History

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

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Applications that render untrusted legacy .doc files using @file-viewer/doc or the msdoc-viewer compatibility package are exposed. The risk is to the application's embedding origin when rendered content is interacted with.

2

What must an attacker do to trigger the vulnerability?

An attacker needs to provide a crafted legacy .doc 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.

3

Are external document links allowed by default after updating?

No. Version 2.3.1 blocks external document links by default. When explicit allow mode is used, only HTTP(S), mail, telephone, safe relative URLs, and internal bookmarks are accepted.

4

Which versions contain the fix?

The fix is included in @file-viewer/doc version 2.3.1 and the msdoc-viewer compatibility release 0.2.2.

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