Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessHost malicious .txt with injected script
-
DeliveryShare or upload file to target app
-
ExploitVictim opens file in react-doc-viewer
-
ExecutionTXTRenderer casts raw content as ReactNode
-
PersistScript executes in victim's browser origin
-
ImpactSteal session tokens or perform authenticated actions
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The victim application must use @cyntler/react-doc-viewer v1.17.1 and must have .txt file rendering enabled (i.e., the TXTRenderer is active in the viewer configuration, which is the default when txt is included in the supported file types). The attacker must be able to supply a crafted .txt file that the application passes to the viewer for rendering - this typically requires either a file upload feature accessible to the attacker or a mechanism to share document URLs. A victim user must then open or preview the crafted file in the viewer (UI:R). Exploitation is limited to the browser session of the victim and the origin of the hosting application. No authentication is required of the attacker (PR:N), but successful exploitation depends on user interaction and the hosting application accepting attacker-controlled .txt input. |
| Impact | The CVSS base score of 6.1 (Medium) with vector AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N reflects a network-reachable, low-complexity, unauthenticated attack that requires user interaction (a victim must open the crafted document) and has changed scope with limited confidentiality and integrity impact. SSVC rates exploitation as 'poc' (proof-of-concept publicly available), automatable as 'no' (the UI:R requirement prevents fully automated mass exploitation), and technical impact as 'partial'. No EPSS score was provided in the intelligence data, so probability of exploitation in the wild cannot be quantified here. The combination of a public POC, no required authentication, and a changed scope elevates real-world risk above what the raw CVSS score suggests for applications that allow untrusted users to supply .txt files for viewing. However, the mandatory user-interaction step and the specificity of the vulnerable code path (only .txt rendering) limit blast radius compared to a universal injection. This is a real priority for any application exposing react-doc-viewer to end-users with untrusted document input. |
| Exploit ScenarioDerived | An attacker crafts a .txt file containing embedded HTML or JavaScript payloads (e.g., an img tag with an onerror handler) and uploads or shares it in a context where the target application uses react-doc-viewer to preview documents. When a victim user opens the document in the viewer, the TXTRenderer casts the file content as a ReactNode, injecting the attacker's script into the page DOM, which executes in the browser under the hosting application's origin. A public proof-of-concept demonstrating this technique is available at https://github.com/walidriouah/CVE-2026-30691. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 20, 2026
Stored/reflected Cross-Site Scripting in @cyntler/react-doc-viewer v1.17.1 allows unauthenticated remote attackers to execute arbitrary JavaScript in a victim's browser by supplying a crafted .txt file for rendering. The TXTRenderer component unsafely casts raw file content directly as a ReactNode without sanitization, bypassing React's default escaping and enabling HTML/script injection. A publicly available proof-of-concept exists; no confirmed active exploitation in CISA KEV at time of analysis.
RemediationAI
No vendor-released patched version is identified in the available intelligence data; absence of a confirmed fix version should not be interpreted as confirmation that no patch exists - check the upstream repository at https://github.com/cyntler/react-doc-viewer/issues/317 for a released fix before taking compensating action. Until a patched version is confirmed, the most effective compensating control is to disable or remove the TXTRenderer component from the viewer configuration, preventing .txt files from being rendered via the vulnerable code path (trade-off: loss of plain-text document preview capability). If TXTRenderer cannot be disabled, restrict the document viewer to only accept files from trusted, server-validated sources rather than allowing arbitrary user-supplied uploads. Additionally, deploying a Content Security Policy (CSP) header with a restrictive script-src directive on the hosting page can limit the impact of any injected script by preventing execution of inline scripts or restricting allowed script origins (trade-off: may break legitimate functionality if the application relies on inline scripts). Monitor the upstream GitHub repository and the POC repository at https://github.com/walidriouah/CVE-2026-30691 for patch releases.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected library, @cyntler/react-doc-viewer v1.17.1 (an npm React component for in-browser document preview), includes a TXTRenderer sub-component responsible for rendering plain-text files. React normally escapes string content rendered to the DOM, but the TXTRenderer explicitly casts raw file buffer data as a ReactNode - a React type that accepts JSX elements and raw HTML structures - circumventing React's built-in XSS protections. This is a CWE-79 (Improper Neutralization of Input During Web Page Generation) flaw rooted in unsafe type coercion rather than a missing sanitization call. The scope is changed (S:C in the CVSS vector) because script execution escapes the document viewer component and can access the full browser origin context of the hosting application. CPE data provided is generic (n/a:n/a), so affected version scope is limited to what the description and GitHub issue confirm: v1.17.1.
Know when N A gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Primary rating from Vendor (mitre) · only source for this CVE.
CVSS VectorVendor: mitre
Lifecycle Timeline
2DescriptionCVE.org
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
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Affected Products (CPE)CVE.org
LibreNMS before 24.10.0 allows a remote attacker to execute arbitrary code via OS command injection involving AboutContr
Reachable assertion in Open5GS up to version 2.7.6 allows remote unauthenticated attackers to crash the Diameter CER han
A Command Injection issue in the payload build page in BYOB (Build Your Own Botnet) 2.0 allows attackers to execute arbi
Denial of service in Open5GS 2.7.6 and earlier allows network-adjacent attackers with low-privilege Diameter Gx peer acc
Denial of service in Open5GS HSS (Home Subscriber Server) versions 2.7.0 through 2.7.6 is triggered remotely by manipula
Remote command injection in Control Web Panel allows unauthenticated attackers to execute arbitrary OS commands as root
LINQPad before 5.52.01 Pro edition is vulnerable to Unsafe Deserialization in LINQPad.AutoRefManager::PopulateFromCache(
Remote code execution in dash-uploader (Python package for Plotly Dash) versions 0.1.0 through 0.7.0a2 allows unauthenti
Command injection in LiteLLM 1.18.10 lets attackers who can configure MCP (Model Context Protocol) servers supply arbitr
SQL injection in AzuraCast's backup restore flow (versions up to and including 0.23.7) lets an attacker achieve privileg
Arbitrary file read in Yu AI Code Mother v4.3 lets anonymous, remote attackers retrieve files outside the intended previ
Remote code execution in APScheduler (all versions through 3.10.x and 4.0.0a5) is achievable when applications deseriali
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB