Vulnerabilities in pkg:npm/msdoc-viewer
PACKAGECVE-2026-91127 is a HIGH (CVSS 8.2) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting File Viewer libraries in the npm ecosystem. The issue involves dom xss via unsafe hyperlink schemes in the legacy doc renderer. Remediation is available by upgrading affected packages to version 0.2.2, 2.3.1.
pkg:npm/msdoc-viewer
Vulnerability advisories affecting package pkg:npm/msdoc-viewer. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-3753-m2x2-q623 | CVE-2026-91127 | HIGH | File Viewer: DOM XSS via unsafe hyperlink schemes in the legacy DOC renderer |
CVE-2026-91127 at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N).
How to Fix CVE-2026-91127
To remediate this vulnerability, upgrade all affected File Viewer dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install msdoc-viewer@0.2.2
npm install @file-viewer/doc@2.3.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls msdoc-viewer
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-91127, inspect your project dependencies using npm:
npm ls msdoc-viewer
Analyze the terminal output to locate any version of File Viewer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.2), your application is affected.
Note: The npm ls msdoc-viewer command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In File Viewer, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-91127 Affected File Viewer Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
msdoc-viewer
|
npm |
< 0.2.2
|
0.2.2
|
|
@file-viewer/doc
|
npm |
< 2.3.1
|
2.3.1
|
References
Frequently Asked Questions
What is CVE-2026-91127?
Which File Viewer versions are affected?
What version fixes CVE-2026-91127?
Is msdoc-viewer affected?
Is @file-viewer/doc affected?
What is the CVSS score of CVE-2026-91127?
What CWE is associated with CVE-2026-91127?
How can I check npm dependencies for CVE-2026-91127?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3753-m2x2-q623",
"modified" : "2026-09-18T17:19:42Z",
"published" : "2026-09-18T17:19:42Z",
"aliases" : [ "CVE-2026-91127" ],
"summary" : "File Viewer: DOM XSS via unsafe hyperlink schemes in the legacy DOC renderer",
"details" : "### Summary\n\nBefore 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.\n\n### Impact\n\nApplications 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.\n\n### Fix\n\nVersion 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.\n\nThanks to @shashank420 for responsibly reporting this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@file-viewer/doc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.3.0"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "msdoc-viewer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.2.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/flyfish-dev/file-viewer/security/advisories/GHSA-3753-m2x2-q623"
}, {
"type" : "WEB",
"url" : "https://github.com/flyfish-dev/file-viewer/commit/ef045680f8d9830a3eee9612f7df46a734361b07"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/flyfish-dev/file-viewer"
}, {
"type" : "WEB",
"url" : "https://github.com/flyfish-dev/file-viewer/releases/tag/v2.3.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79", "CWE-83" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-18T17:19:42Z",
"nvd_published_at" : null
}
}