OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
[sec-adv] Mambo SQL Injection Vulnerabilities

From: Secunia Security Advisories (sec-advsecunia.com)
Date: Fri Sep 19 2003 - 10:23:46 CDT


TITLE:
Mambo SQL Injection Vulnerabilities

SECUNIA ADVISORY ID:
SA9796

VERIFY ADVISORY:
http://www.secunia.com/advisories/9796/

CRITICAL:
Highly critical

IMPACT:
Manipulation of data, Exposure of system information, Exposure of
sensitive information

WHERE:
From remote

SOFTWARE:
Mambo 4.x

DESCRIPTION:
Multiple vulnerabilities have been identified in Mambo allowing
malicious users to manipulate SQL queries and send SPAM anonymously.

1) Mambo fails to verify the "bid" parameter properly in
"banners.php" allowing malicious people to conduct SQL injection.
This can be exploited to write output from queries to a file if the
attacker knows the path to the webroot and the webroot is writeable.
It is then possible to retrieve the data via HTTP.

Example:
/mambo/banners.php?op=click&bid=100 UNION select password from
mos_users where 1=1 into outfile '/path/to/file'

2) The "id" parameter isn't properly verified in
"emailfriend/emailarticle.php" and "emailfriend/emailfaq.php"
allowing malicious people to inject SQL code. An example has been
provided, which emails the MD5 hashed password to an email address.

Example:
mambo/emailfriend/emailarticle.php?submit=submit&email=[email_adr]&youremail=[email
adr]&id=100 UNION select username,email,password from mos_users where
id=1

3) It is possible to send email anonymously using the "Sendmail"
function in "contact.php". This could be exploited by spammers to
SPAM anonymously.

Example:
mambo/contact.php?op=Sendmail&text=[message]&from=[I_don't_SPAM]&name=[Name]&email_to=[SPAM_me]&sitename=[SPAM_heaven.tld]

Issues 1 and 2 only affect Mambo on systems with MySQL 4.

SOLUTION:
Version 4.0.14 is not vulnerable to the SPAM issue.
http://prdownloads.sourceforge.net/mambo/MamboV4.0.14.tar.gz

The only current workaround to prevent the SQL injection is to use
MySQL 3.

REPORTED BY / CREDITS:
lifofifo, hackingzone.org

ORIGINAL ADVISORY:
http://www.hackingzone.org/secviewarticle.php?id=11

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

Secunia recommends that you verify all advisories you receive, by
clicking the link.
Secunia NEVER sends attached files with advisories.
Secunia does not advise people to install third party patches, only
use those supplied by the vendor.

Contact details:
Web : http://www.secunia.com/
E-mail : supportsecunia.com
Tel : +45 7020 5144
Fax : +45 7020 5145

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

Unsubscribe: Secunia Security Advisories

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