WordPress:未授权路径遍历导致条件远程代码执行
WordPress: Unauthenticated path traversal leading to conditional RCE

原始链接: https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-65ch-5whp

WordPress 的 `get_page_template()` 函数存在一个漏洞,允许未经身份验证的攻击者通过针对主题目录之外的 `.php` 文件执行本地文件包含(LFI)攻击。在特定条件下(例如主题包含以“page-”开头的顶层目录),该漏洞可被升级为远程代码执行(RCE)。 此漏洞影响 Twenty Twelve 和 Twenty Fourteen 等旧版主题,以及 Neve、Hestia 和 Sydney 等热门第三方主题。在启用了 `register_argc_argv` 的环境中(例如官方 PHP Docker 镜像或运行旧版本 PHP 的默认 cPanel 配置),RCE 的可行性较高。 WordPress 7.1.2 已包含针对此问题的修复程序。为了保护旧版本站点,该补丁已向后移植至所有可追溯至 4.7 版本的 WordPress。强烈建议用户立即更新其安装程序。该漏洞由 Robert Ressl 发现并负责任地披露。

Sorry.
相关文章

原文

An unauthenticated attacker can make get_page_template() page-template resolution include a chosen readable local .php file outside the active theme directories. If relevant pre-conditions for both the server environment and the active theme are met, this can lead to RCE.

The pre-conditions are:

  • The active child or parent theme contains a top-level directory whose name starts with page- (e.g. page-templates). This affects the legacy Twenty Twelve and Twenty Fourteen themes, as well as some popular third party themes such as Neve, Hestia, and Sydney.
  • A chosen local .php target file exists on the server and is readable by the web server account. The well known pearcmd.php PEAR→RCE transition can be used for this when register_argc_argv is set to On. The official php image for Docker is affected, and the default cPanel configuration is affected when PHP prior to 8.5 is in use.

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.

Discovered and responsibly disclosed by Robert Ressl.

联系我们 contact @ memedata.com