DOMpurify是一款流行的HTML sanitization库,用于防止跨站脚本攻击(XSS)。CVE-2024-47875描述了DOMpurify中一个嵌套相关的mXSS漏洞,允许攻击者绕过安全措施并执行恶意脚本。该漏洞影响DOMpurify 2.x版本,已于2.5.0版本中修复。建议尽快升级以避免潜在风险。
此mXSS漏洞允许攻击者通过构造恶意的HTML代码,绕过DOMpurify的过滤机制,并在受影响的应用程序中执行任意JavaScript代码。攻击者可以利用此漏洞窃取用户的敏感信息,例如cookie、会话令牌和凭据。此外,攻击者还可以利用此漏洞劫持用户会话,冒充用户执行恶意操作,甚至完全控制受影响的应用程序。由于DOMpurify广泛应用于各种Web应用程序中,因此该漏洞的潜在影响非常广泛。
该漏洞已公开披露,并存在公开的POC代码。目前尚未观察到大规模的利用活动,但由于该漏洞的严重性和DOMpurify的广泛使用,预计未来可能会出现利用。该漏洞与GHSA-mmhx-hmjr-r674(CVE-2024-45801)相关,需要注意。
Applications and websites that rely on DOMpurify to sanitize user-supplied HTML input are at risk. This includes content management systems (CMS), forums, online editors, and any other web application that allows users to submit HTML content. Specifically, applications using older versions of DOMpurify or those that haven't implemented robust input validation practices are particularly vulnerable.
• nodejs / server:
npm list dompurifyCheck the installed version of DOMpurify. If it's less than 2.5.0, the system is vulnerable. • generic web: Inspect the DOMPurify JavaScript file for the fix (commit hash 0ef5e537). If the file doesn't contain this commit, the system is vulnerable. • generic web: Review application logs for any unusual JavaScript execution patterns or errors related to DOMPurify.
disclosure
poc
漏洞利用状态
EPSS
0.70% (72% 百分位)
CISA SSVC
CVSS 向量
最有效的缓解措施是立即将DOMpurify升级至2.5.0或更高版本。如果无法立即升级,可以考虑以下临时缓解措施:首先,审查应用程序的代码,查找可能受到影响的HTML输入点。其次,实施严格的输入验证和输出编码策略,以防止XSS攻击。第三,如果使用Web应用程序防火墙(WAF),请配置WAF规则以检测和阻止包含恶意JavaScript代码的请求。最后,监控应用程序的日志,查找可疑活动,例如未经授权的脚本执行。
将 DOMPurify 库更新到 2.5.0 或更高版本,或 3.1.3 或更高版本。这将解决基于嵌套的跨站脚本攻击 (XSS) 漏洞。您可以使用首选的包管理器(如 npm 或 yarn)更新库。
漏洞分析和关键警报直接发送到您的邮箱。
CVE-2024-47875描述了DOMpurify中一个嵌套相关的mXSS漏洞,允许攻击者绕过安全措施并执行恶意脚本。
如果您正在使用DOMpurify 2.x版本,则可能受到影响。请立即升级至2.5.0或更高版本。
升级至DOMpurify 2.5.0或更高版本是修复此漏洞的最佳方法。
目前尚未观察到大规模的利用活动,但由于该漏洞的严重性,预计未来可能会出现利用。
请访问DOMpurify的GitHub仓库:https://github.com/cure53/DOMPurify