CVE-2026-91127 is a high-severity (CVSS 8.2) Cross-site Scripting (XSS) vulnerability in @file-viewer/doc. A fix is available for @file-viewer/doc — see the affected versions and patch details below.
File Viewer: DOM XSS via unsafe hyperlink schemes in the legacy DOC renderer
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-91127.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@file-viewer/docnpmmsdoc-viewernpmDescription
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @file-viewer/doc | all versions | 2.3.1npm install @file-viewer/doc@2.3.1 |
| 📦npm | msdoc-viewer | all versions | 0.2.2npm install msdoc-viewer@0.2.2 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @file-viewer/doc, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @file-viewer/doc to 2.3.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-91127 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is CVE-2026-91127 in your dependencies?
Find it across npm, including transitive dependencies.