Lucene search

K
htbridgeHigh-Tech BridgeHTB23238
HistoryOct 08, 2014 - 12:00 a.m.

Multiple vulnerabilities in EspoCRM

2014-10-0800:00:00
High-Tech Bridge
www.htbridge.com
31

10 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

0.013 Low

EPSS

Percentile

84.1%

High-Tech Bridge Security Research Lab discovered multiple high-risk vulnerabilities in EspoCRM, which can be exploited by remote attacker to execute arbitrary PHP code on a vulnerable system, reinstall the application from scratch, and compromise the entire system as the result. EspoCRM is also vulnerable to less critical Cross-Site Scripting attacks.

1. PHP File Inclusion in EspoCRM: CVE-2014-7985

The vulnerability exists due to absence of sanitization of input data passed via the β€œaction” HTTP GET parameter to β€œ/install/index.php” script before using them in PHP β€œinclude()” function. A remote unauthenticated attacker can include and execute arbitrary local PHP files on the system with privileges of the web server.

Successful exploitation of the vulnerability may allow complete application and system compromise.

Below is a simple PoC (Proof-of-Concept) code that uses path traversal technique to include β€œ/tmp/file.php” file (you can include any other file, content of which you control):

http://[host]/install/index.php?installProcess=1&action=…/…/…/…/…/…/… /…/ tmp/file

The installation script is not deleted after installation, and is accesible without any authentication by default.

2. Improper Access Control in EspoCRM: CVE-2014-7986

The vulnerability is caused by insufficient access control restriction to the installation script β€œ/install/index.php”. Additionally the application fails to properly check whether it was already installed on the system. A remote attacker can set the "installProcess” HTTP GET parameter to 1 and reinstall the application.

The following HTP GET request starts a new installation process:

http://[host]/install/index.php?installProcess=1

3. Reflected Cross-Site Scripting (XSS) in EspoCRM: CVE-2014-7987

Input passed via the β€œdesc” HTTP GET parameter to β€œ/install/index.php” script is not properly sanitized before being returned to the user. A remote attacker can trick a user to open a specially crafted link and execute arbitrary HTML and script code in browser in context of the vulnerable website.

The exploitation example below uses the β€œalert()” JavaScript function to display β€œimmuniweb” word:

http://[host]/install/index.php?installProcess=1&action=errors&desc=%3Cscrip t%3E alert%28%27immuniweb%27%29;%3C/script%3E

CPENameOperatorVersion
espocrmle2.5.2

10 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

0.013 Low

EPSS

Percentile

84.1%