Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-30691 — CVE-2026-30691: Stored Cross-Site Scripting (XSS) in @cyntler/react-doc-viewer | Kitploit
工具/GitHubGitHub/walidriouah/cve-2026-30691
Vulnerability AnalysisWeb Application ExploitationWeb SecurityPapers & ResearchLearning & Education
GitHubwalidriouah/cve-2026-30691

CVE-2026-30691

CVE-2026-30691: Stored Cross-Site Scripting (XSS) in @cyntler/react-doc-viewer

查看仓库
3个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2026-30691 - 漏洞公告

CVE-2026-30691 的官方 MITRE 漏洞记录详情及技术文档。


root@kitploit:~

-----BEGIN PGP SIGNED MESSAGE----- 
Hash: SHA256

[Suggested 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.

[Additional Information] 
"The TXTRenderer is used by default for any text-based files. Since the library is widely used in React applications to preview user-uploaded content, this vulnerability poses a significant risk for applications that do not strictly validate file contents before passing them to the viewer."

[Vulnerability Type] Cross Site Scripting (XSS)
[Vendor of Product] cyntler
[Affected Product Code Base] @cyntler/react-doc-viewer - 1.17.1
[Affected Component] src/renderers/txt/index.tsx
[Attack Type] Remote
[Impact Code execution] true
[Impact Information Disclosure] true

[Attack Vectors] 
"An attacker must provide a specially crafted .txt file containing malicious HTML or JavaScript code. When the victim opens this file using the DocViewer component, the script executes in their browser."

[Reference] https://github.com/cyntler/react-doc-viewer/issues/317
[Discoverer] Walid Riouah

Use CVE-2026-30691.

-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----

🛠️ 详细技术背景

📝 描述

存储型跨站脚本 (XSS) 漏洞已在 @cyntler/react-doc-viewer 包 (v1.17.1) 中被发现。该漏洞存在于 TXTRenderer 组件中,该组件通过将 .txt 文件的原始文件内容显式转换为 ReactNode 进行渲染,而未经任何事先的清理或实体转义。


💻 漏洞代码

在 src/renderers/txt/index.tsx 中:

root@kitploit:~

{currentDocument?.fileData as ReactNode}

🔬 概念验证 (PoC)

要复现该漏洞,创建一个名为 exploit.txt 的文件,包含以下显式脚本载荷,并将其加载到文档查看器组件中:

root@kitploit:~

<h1 style="color: red;">Vulnerable!</h1>
<script>alert('XSS_SUCCESS'); document.body.style.background='red';</script>
<img src=x onerror="console.log('XSS_Executed_Successfully')">

🎯 影响

攻击者可以在受害者浏览器上下文中执行任意 JavaScript。这可能导致:

  • 会话劫持: 通过窃取客户端 Cookie/LocalStorage 数据。
  • 未授权操作: 代表经过身份验证的用户会话执行。
  • 应用篡改: 以及针对平台用户的下游钓鱼攻击。

🛡️ 推荐修复

在渲染之前,使用像 DOMPurify 这样的 HTML 清理库来清理动态文本输入,或者避免将原始字符串输入不安全地转换为 ReactNode 对象:

root@kitploit:~

import DOMPurify from 'dompurify';

const sanitizedHTML = DOMPurify.sanitize(currentDocument?.fileData);
return <div dangerouslySetInnerHTML={{ __html: sanitizedHTML }} />;

公告由 Walid Riouah(网络安全研究员与红队成员)整理

下载工具