Skip to main content

react-doc-viewer CVE-2026-30691

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-05-20 mitre
6.1
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Host malicious .txt with injected script
  2. Delivery
    Share or upload file to target app
  3. Exploit
    Victim opens file in react-doc-viewer
  4. Execution
    TXTRenderer casts raw content as ReactNode
  5. Persist
    Script executes in victim's browser origin
  6. Impact
    Steal 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

npm @cyntler/react-doc-viewer no fix

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

Vendor (mitre) PRIMARY 6.1 MEDIUM
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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
CVSS changed
May 20, 2026 - 20:22 NVD
6.1 (None) 6.1 (MEDIUM)
CVE Published
May 20, 2026 - 00:00 nvd
UNKNOWN (no severity yet)

DescriptionCVE.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

EPSS Score
0.0%
Top 98% exploitable
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:a:n/a:n/a:*:*:*:*:*:*:*:*

More in N A

View all
CVE-2024-51092 CRITICAL POC
9.1 May 08

LibreNMS before 24.10.0 allows a remote attacker to execute arbitrary code via OS command injection involving AboutContr

CVE-2025-15684 MEDIUM POC
5.5 Aug 12

Reachable assertion in Open5GS up to version 2.7.6 allows remote unauthenticated attackers to crash the Diameter CER han

CVE-2024-45257 HIGH POC
7.3 May 08

A Command Injection issue in the payload build page in BYOB (Build Your Own Botnet) 2.0 allows attackers to execute arbi

CVE-2025-15687 LOW POC
2.1 Aug 12

Denial of service in Open5GS 2.7.6 and earlier allows network-adjacent attackers with low-privilege Diameter Gx peer acc

CVE-2025-15686 LOW POC
2.1 Aug 12

Denial of service in Open5GS HSS (Home Subscriber Server) versions 2.7.0 through 2.7.6 is triggered remotely by manipula

CVE-2025-67888 HIGH POC
7.3 May 08

Remote command injection in Control Web Panel allows unauthenticated attackers to execute arbitrary OS commands as root

CVE-2024-53326 HIGH POC
7.3 May 08

LINQPad before 5.52.01 Pro edition is vulnerable to Unsafe Deserialization in LINQPad.AutoRefManager::PopulateFromCache(

CVE-2026-38360 CRITICAL POC
9.8 May 08

Remote code execution in dash-uploader (Python package for Plotly Dash) versions 0.1.0 through 0.7.0a2 allows unauthenti

CVE-2026-30623 CRITICAL POC
9.8 Jul 15

Command injection in LiteLLM 1.18.10 lets attackers who can configure MCP (Model Context Protocol) servers supply arbitr

CVE-2026-67917 CRITICAL POC
9.8 Aug 17

SQL injection in AzuraCast's backup restore flow (versions up to and including 0.23.7) lets an attacker achieve privileg

CVE-2026-75337 CRITICAL POC
9.8 Aug 27

Arbitrary file read in Yu AI Code Mother v4.3 lets anonymous, remote attackers retrieve files outside the intended previ

CVE-2026-31072 CRITICAL POC
9.8 May 19

Remote code execution in APScheduler (all versions through 3.10.x and 4.0.0a5) is achievable when applications deseriali

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy