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
Published: 2026-05-20
Score: 6.1 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability arises because the TXTRenderer component processes file contents without sanitization, and then casts the raw data directly as a ReactNode. This allows a maliciously crafted .txt file to inject and execute arbitrary JavaScript in the context of any web page that renders the file. Attackers could thereby steal user session data, perform actions on behalf of the user, or tamper with page content. The impact is a classic browser‑based remote code execution that compromises confidentiality, integrity, and availability of the client’s session and data.

Affected Systems

Projects or applications that embed the @cyntler/react-doc-viewer JavaScript library, specifically version 1.17.1, are affected. The flaw is tied to the TXTRenderer component used to display .txt files. Any deployment that relies on that component for rendering text documents would be vulnerable.

Risk and Exploitability

No EPSS score is available, and the vulnerability is not listed in the CISA KEV catalog, which indicates limited publicly known exploitation data. The attack vector is remote: an attacker must supply a malicious .txt file that is rendered by the vulnerable component, typically by hosting the file on a server and causing a victim's browser to load it through the application. Successful exploitation requires the victim to use a web interface that consumes .txt files via TXTRenderer. Because the flaw is client‑side, exploitation unfolds in the victim’s browser, enabling the attacker to run arbitrary script without server‑side code execution. The CVSS score of 6.1 classifies the vulnerability as medium severity, but it still allows complete compromise of the client session, so the risk remains significant until a patch or workaround is applied.

Generated by OpenCVE AI on May 20, 2026 at 19:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Pin the project to the latest available version of @cyntler/react-doc-viewer and install the published fix or upgrade to a newer release that removes the vulnerability
  • If an upgrade is not immediately feasible, implement client‑side input validation by sanitizing the loaded file content—remove or escape all JavaScript‑constructing characters before rendering
  • As a last resort, disable the TXTRenderer component for .txt file types or restrict the file types that the component processes to a whitelist that excludes plain text

Generated by OpenCVE AI on May 20, 2026 at 19:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 20 May 2026 19:15:00 +0000

Type Values Removed Values Added
Title Cross‑Site Scripting via Unsanitized Text Rendering in @cyntler/react-doc-viewer

Wed, 20 May 2026 18:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-79
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 20 May 2026 17:45:00 +0000

Type Values Removed Values Added
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
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-05-20T17:50:41.324Z

Reserved: 2026-03-04T00:00:00.000Z

Link: CVE-2026-30691

cve-icon Vulnrichment

Updated: 2026-05-20T17:50:13.807Z

cve-icon NVD

Status : Received

Published: 2026-05-20T18:16:26.760

Modified: 2026-05-20T20:16:37.220

Link: CVE-2026-30691

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-20T20:00:12Z

Weaknesses