Back to list
Advisory 23/2005: vTiger multiple vulnerabilities
Nov 24 2005 11:05PM
Christopher Kunz (christopher kunz hardened-php net)
RE: Advisory 23/2005: vTiger multiple vulnerabilities
Nov 25 2005 09:38PM
Bug Traq Lists (bug traq mail gmail com)
As to #4, restricting access to vtigercrm*.log is not enough. You must
restrict access to vtigercrm*.log* or even *.log*, as vTiger rotates its
logs such as vtigercrm.log.1, etc...
> Since there is currently no fixed version available, you should
> 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 on.
> 4. Install the Hardening-Patch for PHP to disable %00 URL
From: Christopher Kunz [mailto:christopher.kunz (at) hardened-php (dot) net [email concealed]]
Sent: Thursday, November 24, 2005 3:05 PM
To: bugtraq (at) securityfocus (dot) com [email concealed]
Subject: Advisory 23/2005: vTiger multiple vulnerabilities
*** PGP Signature Status: good
*** Signer: Hardened-PHP Signature Key (Invalid)
*** Signed: 11/24/2005 3:33:29 PM
*** Verified: 11/25/2005 12:51:49 PM
*** BEGIN PGP VERIFIED MESSAGE ***
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 (at) hardened-php (dot) net [email concealed]>
Application: vTiger 4.2 and prior
Severity: Cross-Site Scripting, SQL injection and information
disclosure, password hash disclosure, authentication
local file disclosure, remote code execution
Risk: High / Critical (depending on server configuration)
Vendor Status: Vendor informed. No fix available.
vtiger  is an open source customer relationship management system
which is maintained by an indian company with the same name. It has
forked off the SugarCRM project  in an earlier stage, thus a
issues reported by GulfTech Security in  are also present in
additional layer of insecurity has obviously been introduced by the
opers, enabling malicious users to log in to the CRM without any
tials whatsoever and execute remote code.
1) XSS issues-a-plenty
As James Bercegay reported, there is an abundance of XSS problems
over the CRM, with only a few examples being the following:
- a malicious local user could create a contact, lead, account,
tial or other data set that includes script code in any field.
cal fields would be first or last name, but nearly every other
is possible, too. Then, the malicious user could send the link
that contact to the administrator - and have the script code do
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
and also for creating internal links, the string
</script> can be used to create a path-info XSS that exploits
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
to read all their favorite blogs, news sites or other feeds from
the CRM. However, no input checking is performed before aggregated
are sent to the client. A malicious blog, news site or other feed
socially engineer a user into aggregating it and then use script
elevate their privileges via DOM.
We are featuring this as a different attack class since the vector
not require the CRM user to click on any links - being subscribed
seemingly interesting blog is enough to fall victim to this
3) Authentication Bypass
If the php.ini setting "magic_quotes_gpc" is set to "Off", which
setting provided in php.ini-recommended, an attacker can bypass
authentication process completely, by entering a fabricated user
Since the login form is prone to SQL injection (like any other
a username like "foo' or '%'='" leads to the following SQL
This query returns 1 row with the administrator's credentials.
sult set is used to determine that authentication was successful.
The attacker is now logged into the CRM system as the
can perform tasks like uploading the whole CRM instance to a
tem, display system information - and of course mess around with
4) User credential disclosure via SQL Injection
Again, if magic_quotes_gpc is Off, a logged-in user can manipulate
form fields into displaying arbitrary values, including user names
passwords. Again, similar issues were reported by GulfTech - we
found some more injection vulnerabilities like this one:
This discloses all usernames and passwords in the bugtracker
5) Unsafe file inclusion
The "action" and "module" parameters are prone to manipulation,
display of arbitrary files on the server that runs vtiger. A
was reported for SugarCRM in the advisory described by
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
clude any file on the local file system, by utilizing the %00
to null-terminate the include call.
6) Arbitrary code execution
Although remote file inclusion is not possible - all include()
are invariably prepended with relative paths - there is an easy
execute arbitrary code. Since vtiger does some extensive logging
stage of a user's session, one can just enter PHP code in any
parameter or wherever, and be sure that the code will be inserted
a log message. A typical log message with injected PHP code looks
Fri Sep 16 15:43:10 2005,627  DEBUG VT - Message ->query
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
which by default resides in a directory accessible for the web
Using the vulnerability outlined in 5), an attacker can include
file into the CRM suite, prompting any included PHP code to be
Proof of Concept:
Apart from the examples mentioned above, the Hardened PHP Project is
going to release any PoC for these vulnerabilities to the public.
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
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 on.
4. Install the Hardening-Patch for PHP to disable %00 URL characters.
You can discuss this and other vulnerabilities in our forum at
http://forum.hardened-php.net/ - an up-to-date list of advisories can
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
*** END PGP VERIFIED MESSAGE ***
[ reply ]
Copyright 2010, SecurityFocus