Lucene search
K

Egroupware 1.8.005 PHP Object Insertion

🗓️ 21 Feb 2014 00:00:00Reported by Pedro RibeiroType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 41 Views

Vulnerability in EGroupware 1.8.005 PHP Object Insertion can lead to arbitrary file deletion and possible code execution through unserialize() function, affecting multiple files

Related
Code
ReporterTitlePublishedViews
Family
ATTACKERKB
CVE-2014-2027
31 Mar 201514:59
attackerkb
CVE
CVE-2014-2027
31 Mar 201514:00
cve
Cvelist
CVE-2014-2027
31 Mar 201514:00
cvelist
EUVD
EUVD-2014-2079
7 Oct 202500:30
euvd
Tenable Nessus
GLSA-201711-12 : eGroupWare: Remote code execution
13 Nov 201700:00
nessus
Tenable Nessus
Mandriva Linux Security Advisory : egroupware (MDVSA-2015:087)
30 Mar 201500:00
nessus
Gentoo Linux
eGroupWare: Remote code execution
12 Nov 201700:00
gentoo
Mageia
Updated egroupware package fixes security vulnerability
3 Mar 201420:01
mageia
NVD
CVE-2014-2027
31 Mar 201514:59
nvd
OpenVAS
EGroupware < 1.8.006.20140217 Multiple Vulnerabilities
1 Feb 201700:00
openvas
Rows per page
`> Vulnerabilities in EGroupware 1.8.005  
> Discovered by Pedro Ribeiro ([email protected]) of Agile Information Security  
  
====================================================================  
Vulnerability: PHP object insertion leading to all kinds of badness (arbitrary file deletion, possible code execution) (CVE-2014-2027)  
File(line): egroupware/addressbook/csv_import.php(257,258)  
File(line): egroupware/calendar/csv_import.php(277,278)  
File(line): egroupware/projectmanager/csv_import.php(324,325)  
File(line): egroupware/infolog/csv_import.php(336,337)  
File(line): egroupware/preferences/inc/class.uiaclprefs.inc.php(108)  
Code snippet:  
  
egroupware/addressbook/csv_import.php(257,258):  
case 'next':  
$_POST['addr_fields'] = unserialize(stripslashes($_POST['addr_fields']));  
$_POST['trans'] = unserialize(stripslashes($_POST['trans']));  
  
  
egroupware/calendar/csv_import.php(277,278):  
case 'next':  
$_POST['cal_fields'] = unserialize(stripslashes($_POST['cal_fields']));  
$_POST['trans'] = unserialize(stripslashes($_POST['trans']));  
  
  
egroupware/projectmanager/csv_import.php(324,325):  
egroupware/infolog/csv_import.php(336,337):  
case 'next':  
$_POST['info_fields'] = unserialize(stripslashes($_POST['info_fields']));  
$_POST['trans'] = unserialize(stripslashes($_POST['trans']));  
  
  
egroupware/preferences/inc/class.uiaclprefs.inc.php(108):  
if ($_POST['save'] || $_POST['apply'])  
{  
$processed = $_POST['processed'];  
$to_remove = unserialize(urldecode($processed));  
  
  
Arbitrary file overwrite in __destruct:  
egroupware/etemplate/inc/class.etemplate_request_files.inc.php  
140 function __destruct()  
141 {  
142 if ($this->remove_if_not_modified && !$this->data_modified)  
143 {  
144 //error_log(__METHOD__."() destroying $this->id");  
145 @unlink(self::$directory.'/'.$this->id);  
146 }  
147 elseif (!$this->destroyed && $this->data_modified &&  
148 !file_put_contents($filename = self::$directory.'/'.$this->id,serialize($this->data)))  
149 {  
150 error_log("Error opening '$filename' to store the etemplate request data!");  
151 }  
152 }  
  
  
Comment:  
User input is passed directly into unserialize(), leading to object insertion, arbitrary file deletion and possible code execution.  
There are lots of classes with exploitable magic methods, and the above is just an example.  
  
  
References:  
https://www.owasp.org/index.php/PHP_Object_Injection  
http://www.alertlogic.com/writing-exploits-for-exotic-bug-classes/  
http://www.suspekt.org/downloads/POC2009-ShockingNewsInPHPExploitation.pdf  
http://vagosec.org/2013/12/wordpress-rce-exploit/  
  
  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation