what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

vtiger CRM 5.4.0 PHP Code Injection

vtiger CRM 5.4.0 PHP Code Injection
Posted Aug 1, 2013
Authored by EgiX | Site karmainsecurity.com

vtiger CRM versions 5.4.0 and below suffer from a remote PHP code injection vulnerability in vtigerolservice.php.

tags | advisory, remote, php
advisories | CVE-2013-3214
SHA-256 | 815a18f425acb88ab1539eda82729d41812748d11048ac8fb98c75353fce269b

vtiger CRM 5.4.0 PHP Code Injection

Change Mirror Download
--------------------------------------------------------------------------
vtiger CRM <= 5.4.0 (vtigerolservice.php) PHP Code Injection Vulnerability
--------------------------------------------------------------------------


[-] Software Link:

http://www.vtiger.com/


[-] Affected Versions:

All versions from 5.0.0 to 5.4.0.


[-] Vulnerability Description:

The vulnerable code is located in the AddEmailAttachment SOAP method defined in /soap/vtigerolservice.php:

458. function AddEmailAttachment($emailid,$filedata,$filename,$filesize,$filetype,$username,$session)
459. {
460. if(!validateSession($username,$session))
461. return null;
462. global $adb;
463. require_once('modules/Users/Users.php');
464. require_once('include/utils/utils.php');
465. $filename = preg_replace('/\s+/', '_', $filename);//replace space with _ in filename
466. $date_var = date('Y-m-d H:i:s');
467.
468. $seed_user = new Users();
469. $user_id = $seed_user->retrieve_user_id($username);
470.
471. $crmid = $adb->getUniqueID("vtiger_crmentity");
472.
473. $upload_file_path = decideFilePath();
474.
475. $handle = fopen($upload_file_path.$crmid."_".$filename,"wb");
476. fwrite($handle,base64_decode($filedata),$filesize);
477. fclose($handle);

The vulnerability exists because this method fails to properly validate input passed through the "filedata" and
"filename" parameters, which are used to write an "email attachment" in the storage directory (lines 475-477).
This can be exploited to write (or overwrite) files with any content, resulting in execution of arbitrary PHP code.


[-] Solution:

The patch provided by the vendor (http://www.vtiger.com/blogs/?p=1467) doesn't fix completely this
vulnerability, because a remote authenticated user can still be able to inject and execute arbitrary code.

[*] The vendor was alerted about this when the feedback has been provided.


[-] Disclosure Timeline:

[13/01/2013] - Vendor notified
[06/02/2013] - Vendor asked feedback abouthttp://trac.vtiger.com/cgi-bin/trac.cgi/changeset/13848
[05/03/2013] - Feedback provided to the vendor [*]
[26/03/2013] - Vendor patch released
[18/04/2013] - CVE number requested
[20/04/2013] - CVE number assigned
[01/08/2013] - Public disclosure


[-] CVE Reference:

The Common Vulnerabilities and Exposures project (cve.mitre.org)
has assigned the name CVE-2013-3214 to this vulnerability.


[-] Credits:

Vulnerability discovered by Egidio Romano.


[-] Original Advisory:

http://karmainsecurity.com/KIS-2013-07

Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    0 Files
  • 16
    Jul 16th
    0 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close