WordPress 未授权路径遍历安全风险
问题概述
WordPress 存在未授权路径遍历漏洞,攻击者可通过用户可控的模板路径实现条件性远程代码执行。该漏洞源于 locate_template() 函数未对路径进行足够校验,导致普通用户可利用。此外,WordPress 的文件路径抽象缺乏安全性,使得类似漏洞屡屡出现。
痛点标签
- 缺乏安全的文件路径抽象,导致路径遍历等安全漏洞频发
- 用户可控的模板路径未被充分校验,引发未授权代码执行风险
- WordPress 代码文档混乱、方法未记录,增加开发与维护的复杂度
待验证问题
- 是否有兴趣使用或开发能够自动检测并修复 WordPress 主题模板路径遍历的安全插件?
- 当前 WordPress 生态中是否缺乏类似的路径安全抽象工具?
- 企业用户在升级或迁移时是否更倾向于寻找替代方案以规避此类漏洞?
证据
原话
Note that locate_template() does not prevent directory traversal attacks, so if you’re passing a user-provided template name to the function, be sure to verify that it’s from one of the three appropriate locations (active theme directory, parent theme directory, or /wp-includes/theme-compat/ directory).
事实
WordPress 7.1.2 has been released containing a fix for the vulnerability, and as a courtesy to users on older branches the fix has been backported to all branches back to 4.7
免责声明:本卡片由 AI 从社区讨论中提炼,属于「痛点证据」,是需求分析与验证的起点,不等同于「已验证的市场需求」。AI 存在分析局限,关键决策前请打开上方原始讨论人工复核。