VYPR
Medium severity6.1NVD Advisory· Published May 20, 2026· Updated May 20, 2026

CVE-2026-30691

CVE-2026-30691

Description

Cross-Site Scripting (XSS) vulnerability in @cyntler/react-doc-viewer v1.17.1 allows remote attackers to execute arbitrary JavaScript via a crafted .txt file. The TXTRenderer component fails to sanitize file content and explicitly casts raw data as a ReactNode

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Crafted .txt files can execute arbitrary JavaScript in @cyntler/react-doc-viewer v1.17.1 due to unsanitized ReactNode casting in TXTRenderer.

Vulnerability

A stored Cross-Site Scripting (XSS) vulnerability exists in the @cyntler/react-doc-viewer package version 1.17.1. The flaw resides in the TXTRenderer component (src/renderers/txt/index.tsx), which renders .txt file content by explicitly casting currentDocument?.fileData as a ReactNode without any sanitization or escaping [1][2]. This allows arbitrary HTML and JavaScript to be executed when the file is displayed.

Exploitation

An attacker creates a specially crafted .txt file containing malicious HTML/JavaScript (e.g., ``). The file is then loaded into the DocViewer component. No authentication or special network position is required beyond the ability to upload or provide the file to a victim. When the victim opens the file, the script executes in their browser context [1][2].

Impact

Successful exploitation results in arbitrary JavaScript execution in the victim's browser. This can lead to session hijacking, theft of cookies, unauthorized actions performed on behalf of the user, website defacement, and phishing attacks [2]. Both information disclosure and code execution are possible within the browser's security context.

Mitigation

As of the published date (2026-05-20), no official patch has been released. Users should sanitize file content before passing it to the viewer, for example by using a library like DOMPurify [2]. Alternatively, avoid using the TXTRenderer for untrusted .txt files. Monitor the repository for updates.

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

1

News mentions

0

No linked articles in our index yet.