一款轻量级高性能扫描器,用 Go 编写,用于检测生产环境中存在完整消毒器绕过漏洞的 DOMPurify 部署,该漏洞源于 <selectedcontent> 的重新克隆逻辑缺陷。
该工具不依赖容易被剥离的源码注释或版本变量,而是通过逻辑指纹识别技术分析压缩的生产环境 JavaScript 包,识别未修补的允许标签配置。
在 DOMPurify 版本 3.4.4 及之前,<selectedcontent> 元素默认被允许。这引入了一个逻辑缺陷:Chromium/WebKit 浏览器会在 DOMPurify 完成消毒处理后,刷新并重新克隆 <selectedcontent> 子树,导致当负载被注入实时 DOM 时,发生绝对 XSS 绕过。

# Clone the repository
git clone https://github.com/Galaxy-sc/CVE-2026-47423-dompurify-xss-detector.git
cd CVE-2026-47423-dompurify-xss-detector
# Run against a target using parameters
go run CVE-2026-47423.go -u https://example.com
通过包管理器将 dompurify 更新到 3.4.5 或更高版本:
npm install [email protected]
如果无法立即升级,可在配置中手动阻止该标签:
DOMPurify.sanitize(userInput, { FORBID_TAGS: ['selectedcontent'] });