Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
|
|
|
|
|
|
|
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
|
|
|
|
Become a Partner and License Our Database or Notification Service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coppermine Photo Gallery Bugs Permit Cross-Site Scripting and SQL Injection Attacks
|
|
SecurityTracker Alert ID: 1019285
|
|
SecurityTracker URL: http://securitytracker.com/id?1019285
|
|
CVE Reference: GENERIC-MAP-NOMATCH
(Links to External Site)
|
Date: Jan 31 2008
|
Impact: Disclosure of authentication information, Disclosure of system information, Disclosure of user information, Execution of arbitrary code via network, Modification of user information, User access via network
|
Fix Available: Yes
Exploit Included: Yes
Vendor Confirmed: Yes
|
Version(s): 1.4.14
|
Description: Several vulnerabilities were reported in Coppermine Photo Gallery. A remote user can conduct cross-site scripting attacks. A remote
authenticated administrative user can inject SQL commands. A remote user can determine the installation path.
The 'docs/showdoc.php' script does not properly filter HTML code from user-supplied input before displaying the input. A remote
user can create a specially crafted URL that, when loaded by a target user, will cause arbitrary scripting code to be executed by
the target user's browser. The code will originate from the site running the Coppermine Photo Gallery software and will run in
the security context of that site. As a result, the code will be able to access the target user's cookies (including authentication
cookies), if any, associated with the site, access data recently submitted by the target user via web form to the site, or take
actions on the site acting as the target user.
The 'util.php' and 'reviewcom.php' scripts do not properly validate user-supplied
input. A remote authenticated administrative user can supply a specially crafted parameter value to execute SQL commands on the
underlying database.
A remote user can supply the following URL to determine the installation path:
http://[target]/coppermine.1.4.14/include/slideshow.inc.php
A
remote user can execute the 'update.php' to obtain potentially sensitive information about the system configuration.
Janek Vind
"waraxe" reported these vulnerabilities.
The original advisory is available at:
http://www.waraxe.us/advisory-66.html
|
Impact: A remote user can access the target user's cookies (including authentication cookies), if any, associated with the site running the
Coppermine Photo Gallery software, access data recently submitted by the target user via web form to the site, or take actions on
the site acting as the target user.
A remote user can execute SQL commands on the underlying database.
A remote user can determine
the installation path.
|
Solution: The vendor has issued a fixed version (1.4.15).
|
Vendor URL: coppermine-gallery.net/ (Links to External Site)
|
Cause: Access control error, Input validation error
|
Underlying OS: Linux (Any), UNIX (Any), Windows (Any)
|
Reported By: come2waraxe@yahoo.com
|
Message History:
None.
|
Source Message Contents
|
Date: 31 Jan 2008 13:49:59 -0000
From: come2waraxe@yahoo.com
Subject: [waraxe-2008-SA#066] - Multiple Vulnerabilities in Coppermine 1.4.14
|
[waraxe-2008-SA#066] - Multiple Vulnerabilities in Coppermine 1.4.14
===============================================================================
Author: Janek Vind "waraxe"
Date: 31. January 2008
Location: Estonia, Tartu
Web: http://www.waraxe.us/advisory-66.html
Target software description:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Coppermine Photo Gallery is a multi-purpose fully-featured and integrated web
picture gallery script written in PHP using GD or ImageMagick as image library
with a MySQL backend.
Coppermine Photo Gallery has been tested working well on IIS, Apache 1.3.24
onwards to the latest Apache 2, on Linux, UNIX, OSX, and Win32 systems.
Vulnerabilities discovered
===============================================================================
1. Reflected XSS in "docs/showdoc.php"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://localhost/coppermine.1.4.14/docs/showdoc.php?
h=waraxe&t=<script>alert(123);</script>
http://localhost/coppermine.1.4.14/docs/showdoc.php?
h=</title><script>alert(123);</script>&t=waraxe
2. Low-impact sql injection(s) in "util.php"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Preconditions:
===============
a) Attacker must have Coppermine admin privileges.
Example fragment from source code:
--------------------------------------------------
function update_thumbs()
global $CONFIG, $lang_util_php;
$albumid = (isset($_POST['albumid'])) ? $_POST['albumid'] : 0;
$albstr = ($albumid) ? "WHERE aid = $albumid" : '';
$updatetype = $_POST['updatetype'];
$numpics = $_POST['numpics'];
$startpic = (isset($_POST['startpic'])) ? $_POST['startpic'] : 0;
echo "<h2>{$lang_util_php['thumbs_wait']}</h2>";
$result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']}
$albstr LIMIT $startpic, $numpics");
$count = mysql_num_rows($result);
--------------------------------------------------
As seen above, "$_POST['albumid']", "$_POST['startpic']" and
"$_POST['numpics']" are used in sql query without proper sanitization.
Clearly this points to possible sql injection security hole.
As this script can be used only by admins, then i'd classify it as
"low impact". By the way, there seems to be more sql injections in this
script.
3. Low-impact sql injection(s) in "reviewcom.php"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Preconditions:
===============
a) Attacker must have Coppermine admin privileges.
Example fragment from source code:
--------------------------------------------------
if (isset($_POST['cid_array'])) {
$cid_array = $_POST['cid_array'];
$cid_set = '';
foreach ($cid_array as $cid)
$cid_set .= ($cid_set == '') ? '(' . $cid : ', ' . $cid;
$cid_set .= ')';
cpg_db_query("DELETE FROM {$CONFIG['TABLE_COMMENTS']}
WHERE msg_id IN $cid_set");
$nb_com_del = mysql_affected_rows();
--------------------------------------------------
It's easy to spot the problem - unsanitized data from "$_POST['cid_array']"
is used in DELETE query. In case of MySql 4.1.x attacker can fetch any info
from database via using subqueries functionality in affected DELETE query.
"Low impact" - because Coppermine admin privileges needed.
4. Information leakage in "update.php"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Anyone can execute update script "update.php":
http://victim.com/cpg14x/update.php
This specific script seems to be harmless in allready installed coppermine
instances, but looking at output, produced by script, we can see some insider
information. Example - database table prefix can be seen by potential attacker.
This piece of information can be useful in further attacks.
5. Path diclosure in "include/slideshow.inc.php"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://localhost/coppermine.1.4.14/include/slideshow.inc.php
... and we see error message in javascript source code:
<b>Fatal error</b>: Call to undefined function get_pic_data() in <b>
C:\apache_wwwroot\coppermine.1.4.14\include\slideshow.inc.php
</b> on line <b>53</b><br />
How to fix:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Download new Coppermine version 1.4.15 as soon as possible!
Greetings:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Greets to ToXiC, LINUX, y3dips, Sm0ke, Heintz, slimjim100, koko, str0ke
and anyone else who know me!
Greetings to Raido Kerna. Tervitusi Torufoorumi rahvale!
Contact:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
come2waraxe@yahoo.com
Janek Vind "waraxe"
Homepage: http://www.janekvind.com/
Waraxe forum: http://www.waraxe.us/forums.html
---------------------------------- [ EOF ] ---------------------------------
|
|
Go to the Top of This SecurityTracker Archive Page
|