# Exploit Title: CiviCRM 3.1 < Beta 5 Multiple XSS Vulnerabilities # Date: Dec 10 2009 # Author: h00die (mcyr2@csc.com) & Ch3nz (vpierorazio@csc.com) # Software Link: http://sourceforge.net/projects/civicrm/files/civicrm-latest/3.1.beta1/civicrm-3.1.beta1-standalone.tar.gz/download # Version: 3.1 Beta 1 # Tested on: BT4 pre-final # Greetz to muts and loganWHD # http://www.offensive-security.com/offsec101.php turning script kiddies into ninjas daily #Timeline #Discovery Date: Dec 9 2009 #Vendor Notification: Dec 31 2009 #Vendor Patch: Jan 13, 2010. Update to Beta 5 with fixes, also patch for Beta 4 released. #Public Disclosure: Jan 13, 2010 #Background: Separated XSS Injection ######################################################### CiviCRM uses a fairly complex filtering system to try to prevent attacks, yet still have the highest level of flexibility. One of those filters prevents from being in the same input box. In several cases it is possible to use multiple input boxes that get displayed later either together or close enough that it is possible to inject the 1st half of the code in the first box with a trailing comment, then inject the end comment and end script in the second box. We call this Separated XSS Injection. For instance, you have input box 1, and input box 2. It is not possible to get by the IDS in the software by injecting into either of those boxes. When the content is later displayed it is displayed in a table consisting of: Input box 1, ID# (auto generated), Input box 2. By injecting into input box 2 the content in the table then becomes: . This script is now executable even though it was split and injected into different areas. ######################################################### #Vulnerable injection points ######################################################### 1. Tags 1a. HTML injection in both the Name and Description fields. 1b. Separated XSS Injection using the Name and Description input boxes. When the data is displayed, there is an ID field between the two items, so in order to inject data but still have it look correctly try this: Name: Tag