Bugtraq mailing list archives

Mambo 4.5.2.2 SQL Injection in UPDATE statement


From: pokley <pokleyzz () scan-associates net>
Date: Wed, 15 Jun 2005 17:54:39 +0800

Product : Mambo 4.5.2.2 (http://www.mamboserver.com)
Summary: Mambo 4.5.2.2 and below SQL Injection in UPDATE statement
Severity: Low

Description
===========
Mambo is a full-featured management system that can be used for everything from simple websites to complex corporate applications.

Details
=======
We have found uncritical sql injection vulnerability in com_contents component when user vote for the content.

 -- content.php --

 100             case 'vote':
101 recordVote ( $url , $user_rating , $cid , $database);
 102                     break;
 ...
1478 $query = "UPDATE #__content_rating" 1479 . "\n SET rating_count = rating_count + 1," 1450 . "\n rating_sum = rating_sum + $user_rating,"
 1451                                    . "\n lastip = '$currip'"
 1452                                    . "\n WHERE content_id = ". $cid
 1453                                    ;

 ----------------

On line 1450 $user_rating using user supplied value without any validation.
This kind of vulnerability is exploitable to gain sensitif information if Mambo configured to using mySQL 4.1 and above.


Fix
===
Fix available from Mambo website (http://mamboforge.net/frs/?group_id=5)

Proof of concept
================
See Attachment

Vendor Response
===============
15th June 2005 - Vendor Contacted
15th June 2005 - Fix Available

Attachment: mambo4521-mysql41.php
Description:


Current thread: