/

CVE-2026-91127

Severity:

HIGH RISK

(8.2)

Stored XSS (CWE-79) in File Viewer DOC Renderer Module

CVE-2026-91127

Deferred

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79, CWE-83

Impact:

Client-Side Script Execution

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A cross-site scripting vulnerability in the legacy DOC renderer allows document-controlled hyperlinks to be emitted into generated HTML without sufficiently restricting their URL schemes. When a user clicks a crafted link in an embedding application, script may execute in that application's origin.

Affected context

The issue affects applications embedding File Viewer components that use the legacy DOC renderer in versions before the relevant fixes. Risk is present when a user opens a crafted legacy DOC file, external document links are enabled or otherwise permitted, and the rendered hyperlink is displayed in the application's security origin.

Exploit preconditions

  • Attack surface: HTML generated by the legacy DOC rendering component - Required access: Ability to provide or cause a user to open a crafted DOC

document

  • Trigger point: User interaction with a rendered document hyperlink - Why exploitation is possible: Document-controlled link targets are escaped

as text but are not adequately restricted to safe URL schemes before being

inserted into generated HTML

Why this happens

The underlying bug is incomplete output and URL-context validation. Character escaping protects markup characters but does not make every URL scheme safe. When document-controlled hyperlink targets are inserted into HTML without an allowlist or equivalent scheme policy, browser navigation behavior can treat the value as executable script content. This maps primarily to CWE-79, Cross-Site Scripting, and is also related to CWE-83, Improper Neutralization of Script-Related HTML Tags in a Web Page.

Potential impact

  • Arbitrary script may execute in the embedding application's origin
  • Session information or application data could be exposed
  • Application actions may be performed on behalf of an affected user
  • Users could be redirected to untrusted destinations
  • Integrity of displayed documents or surrounding application workflows could be affected

General mitigation guidance

Mitigation generally focuses on treating document links as untrusted content and enforcing a secure URL policy before HTML generation. Secure-by-default behavior can disable external document links unless an application explicitly enables them. If links are allowed, implementations can restrict them to HTTP(S), mail, telephone, safe relative URLs, and internal bookmarks, while rejecting executable or otherwise unsafe schemes. Context-aware HTML sanitization, mount-boundary or container-boundary checks, and a strict content security policy can provide additional defense in depth. Applications should reduce input trust, isolate document rendering where practical, and run viewers with only the privileges required for their function.

How teams detect issues like this

Detection approaches include static analysis for document-derived values flowing into HTML attributes or hyperlink targets without URL-scheme validation, and code review checks for escaping used as a substitute for contextual sanitization. Security tests can exercise supported document formats with benign links using disallowed schemes and verify that links are blocked or neutralized. Policy enforcement can require centralized URL allowlists, safe-by-default viewer configuration, and content security policy controls. Automated security review tools may help identify unsafe DOM or HTML-generation patterns.

Sources

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

Frequently asked

questions

Exploitation is generally limited to applications that embed the affected

legacy DOC renderer and present rendered hyperlinks to users. The impact

depends on the privileges and data available to the embedding application's

origin.

An attacker typically needs a way to supply or influence a legacy DOC file and

have a victim open it in the affected viewer. Direct server access is not

necessarily required.

Disable external document links by default and validate every link against a

strict allowlist before generating HTML. Escaping alone is not sufficient for

URL safety.

Treat document metadata as untrusted input, use context-aware sanitization,

enforce safe URL policies in shared rendering code, apply least privilege to

the viewer, and include malicious-document cases in automated security tests.

Find out what's already
exploitable in your codebase.