exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Hardened-PHP Project Security Advisory 2005-23.105

Hardened-PHP Project Security Advisory 2005-23.105
Posted Nov 30, 2005
Authored by Stefan Esser, Hardened-PHP Project | Site hardened-php.net

Multiple cross site scripting, authentication bypass, SQL injection, file inclusion, and password hash disclosure flaws exist in vTiger versions 4.2 and below. Various details disclosed.

tags | exploit, xss, sql injection, file inclusion
SHA-256 | 5cebea0b280288ffbeb4e2854a40c056858c7c6bd6909cddb3b0988a9a8c0f45

Hardened-PHP Project Security Advisory 2005-23.105

Change Mirror Download
Hash: SHA1

Hardened PHP Project

-= Security Advisory =-

Advisory: Multiple vulnerabilities in vTiger CRM
Release Date: 2005/11/24
Last Modified: 2005/11/24
Author: Christopher Kunz <christopher.kunz@hardened-php.net>
Application: vTiger 4.2 and prior
Severity: Cross-Site Scripting, SQL injection and information
disclosure, password hash disclosure, authentication bypass,
local file disclosure, remote code execution
Risk: High / Critical (depending on server configuration)
Vendor Status: Vendor informed. No fix available.
References: http://www.hardened-php.net/advisory_232005.105.html


vtiger [1] is an open source customer relationship management system (CRM)
which is maintained by an indian company with the same name. It has been
forked off the SugarCRM project [2] in an earlier stage, thus a number of
issues reported by GulfTech Security in [3] are also present in vtiger. An
additional layer of insecurity has obviously been introduced by the devel-
opers, enabling malicious users to log in to the CRM without any creden-
tials whatsoever and execute remote code.


1) XSS issues-a-plenty
As James Bercegay reported, there is an abundance of XSS problems all
over the CRM, with only a few examples being the following:
- a malicious local user could create a contact, lead, account, poten-
tial or other data set that includes script code in any field. Typi-
cal fields would be first or last name, but nearly every other field
is possible, too. Then, the malicious user could send the link to
that contact to the administrator - and have the script code do what-
ever DOM operation is necessary to elevate privileges.
- Even easier and without any inside knowledge needed:
('document.cookie')%3C/script%3E (as reported by James).
- Since the variable $_SERVER['PHP_SELF'] is used for most form actions,
and also for creating internal links, the string "><script>alert('xss')
</script> can be used to create a path-info XSS that exploits any
logged-in user. The URI parameters are irrelevant and have been
ommitted to keep the example clean.

2) Remote XSS in RSS
vtiger features a comprehensive RSS aggregation module, allowing users
to read all their favorite blogs, news sites or other feeds from within
the CRM. However, no input checking is performed before aggregated feeds
are sent to the client. A malicious blog, news site or other feed could
socially engineer a user into aggregating it and then use script code to
elevate their privileges via DOM.
We are featuring this as a different attack class since the vector does
not require the CRM user to click on any links - being subscribed to an
seemingly interesting blog is enough to fall victim to this attack.

3) Authentication Bypass
If the php.ini setting "magic_quotes_gpc" is set to "Off", which is the
setting provided in php.ini-recommended, an attacker can bypass the
authentication process completely, by entering a fabricated user name.
Since the login form is prone to SQL injection (like any other form),
a username like "foo' or '%'='" leads to the following SQL statement:
FROM users
WHERE user_name='admin'
OR '%'='%'
AND user_password='adAZ2jidC3H1M'
This query returns 1 row with the administrator's credentials. This re-
sult set is used to determine that authentication was successful.
The attacker is now logged into the CRM system as the administrator and
can perform tasks like uploading the whole CRM instance to a remote sys-
tem, display system information - and of course mess around with the
customer data.

4) User credential disclosure via SQL Injection
Again, if magic_quotes_gpc is Off, a logged-in user can manipulate many
form fields into displaying arbitrary values, including user names and
passwords. Again, similar issues were reported by GulfTech - we have
found some more injection vulnerabilities like this one:
This discloses all usernames and passwords in the bugtracker ticket list.

5) Unsafe file inclusion
The "action" and "module" parameters are prone to manipulation, allowing
display of arbitrary files on the server that runs vtiger. A similar bug
was reported for SugarCRM in the advisory described by CVE-2004-1227,
however the problem is far more widespread.
Since variables from GET, POST, COOKIE and SESSION are passed to
include() calls mostly without any checking, they can be abused to in-
clude any file on the local file system, by utilizing the %00 character
to null-terminate the include call.

6) Arbitrary code execution
Although remote file inclusion is not possible - all include() statements
are invariably prepended with relative paths - there is an easy way to
execute arbitrary code. Since vtiger does some extensive logging at every
stage of a user's session, one can just enter PHP code in any field, GET
parameter or wherever, and be sure that the code will be inserted into
a log message. A typical log message with injected PHP code looks like
Fri Sep 16 15:43:10 2005,627 [4648] DEBUG VT - Message ->query being
executed : select crmentity.crmid, crmentity.smownerid,[truncated]
where crmentity.deleted=0 AND potentialname like '<?php phpinfo() ?>%'
Every log message is by default saved to the log file 'vtigercrm.log',
which by default resides in a directory accessible for the web server.
Using the vulnerability outlined in 5), an attacker can include the log
file into the CRM suite, prompting any included PHP code to be executed.

Proof of Concept:

Apart from the examples mentioned above, the Hardened PHP Project is not
going to release any PoC for these vulnerabilities to the public.

Disclosure Timeline:

16. September 2005 - Vendor informed.
10. October 2005 - Follow-up to vendor.
24. November 2005 - public disclosure


Since there is currently no fixed version available, you should protect your
vTiger installation with the following measures:
1. Restrict access to vtigercrm*.log via .htaccess
2. Switch register_globals to Off.
3. Turn magic_quotes_gpc off.
4. Install the Hardening-Patch for PHP to disable %00 URL characters.


[1] http://www.vtiger.com/
[2] http://www.sugarcrm.org/
[3] http://www.gulftech.org/?node=research&article_id=00053-120104


You can discuss this and other vulnerabilities in our forum at
http://forum.hardened-php.net/ - an up-to-date list of advisories can be
found at http://www.hardened-php.net/.



pub 1024D/0A864AA1 2004-04-17 Hardened-PHP Signature Key
Key fingerprint = 066F A6D0 E57E 9936 9082 7E52 4439 14CC 0A86 4AA1

Copyright 2005 Christopher Kunz / Hardened PHP Project. All rights reserved.

Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

Login or Register to add favorites

File Archive:

December 2022

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

Top Authors In Last 30 Days

File Tags


packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By