CVE-2024-52291 是 CraftCMS 中的一个文件系统绕过漏洞,允许攻击者通过使用双 file:// 协议绕过本地文件系统验证。此漏洞可能导致攻击者访问敏感文件、覆盖文件,并在特定条件下触发服务器端模板注入 (SSTI),从而实现远程代码执行。该漏洞影响 CraftCMS 版本小于或等于 5.4.5.1 的用户。已发布安全补丁,建议立即升级至 5.4.6 版本。
攻击者利用此漏洞可以绕过 CraftCMS 的文件系统验证机制,通过构造 file://file://// 这样的 URL,指定任意敏感目录作为文件系统。这使得攻击者能够访问未经授权的文件,并可能通过恶意文件上传覆盖现有文件。更严重的是,在允许管理员更改设置开启的情况下,攻击者可能利用 SSTI 漏洞执行任意代码,完全控制服务器。这种攻击模式类似于其他文件系统绕过漏洞,可能导致数据泄露、系统破坏甚至远程控制。
该漏洞已于 2024 年 11 月 13 日公开披露。目前尚未观察到大规模的利用活动,但由于漏洞的严重性和易于利用性,预计未来可能会出现更多利用尝试。该漏洞尚未被添加到 CISA KEV 目录,但其高 CVSS 评分表明存在潜在风险。建议密切关注安全社区的动态,并及时采取缓解措施。
Organizations using CraftCMS with the allowAdminChanges setting enabled are particularly at risk. Shared hosting environments where multiple users share the same server instance are also vulnerable, as an attacker could potentially exploit this vulnerability to gain access to other users' data. Legacy CraftCMS installations with outdated plugins or themes may exacerbate the risk.
• php: Examine web server access logs for requests containing the double file:// scheme.
grep 'file://file://' /var/log/apache2/access.log• php: Monitor CraftCMS configuration files for unexpected modifications, particularly those related to file upload settings.
• generic web: Scan for exposed file upload endpoints and test with crafted payloads containing the double file:// scheme to identify potential bypasses.
• generic web: Review server-side template rendering logic for potential SSTI vulnerabilities.
disclosure
漏洞利用状态
EPSS
0.09% (26% 百分位)
CISA SSVC
CVSS 向量
最有效的缓解措施是立即将 CraftCMS 升级至 5.4.6 或更高版本,该版本修复了此漏洞。如果无法立即升级,可以考虑禁用 allowAdminChanges 设置,以降低 SSTI 攻击的风险。此外,实施严格的文件上传验证规则,限制允许上传的文件类型和大小,可以进一步减少攻击面。监控 CraftCMS 的日志文件,查找异常的文件访问或上传行为,有助于及时发现潜在的攻击尝试。升级后,请确认通过尝试上传文件并验证文件系统验证是否正常工作来验证修复。
Actualice Craft CMS a la versión 5.4.6 o superior, o a la versión 4.12.5 o superior. Esto corrige la vulnerabilidad de omisión de validación del sistema de archivos local. Asegúrese de deshabilitar la opción `allowAdminChanges` si no es necesaria.
漏洞分析和关键警报直接发送到您的邮箱。
CVE-2024-52291 是 CraftCMS 中一个允许攻击者通过双 file:// 协议绕过文件系统验证的漏洞,可能导致敏感文件访问、文件覆盖和远程代码执行。
如果您正在使用 CraftCMS 5.4.5.1 或更早版本,则可能受到影响。请立即升级至 5.4.6 或更高版本。
最有效的修复方法是立即将 CraftCMS 升级至 5.4.6 或更高版本。如果无法升级,请禁用 allowAdminChanges 设置。
目前尚未观察到大规模的利用活动,但由于漏洞的严重性和易于利用性,预计未来可能会出现更多利用尝试。
请访问 CraftCMS 官方网站或安全公告页面,查找有关 CVE-2024-52291 的详细信息和修复指南:https://craftcms.com/docs/5.x