Search | Research | Contact Us Friday June 16, 2022
Most Viewed Items
  1 PHPXMLRPC Library Remote Code Execution
  2 XOOPS 2.0.11 && Earlier Multiple Vulnerabilities
  3 Multiple Invision Power Board Vulnerabilities
  4 eBay And Amazon Still Vulnerable
  5 When Small Mistakes Can Cause Big Problems
  6 Woltlab Burning Board SQL Injection Vulnerability
  7 PEAR XML_RPC Library Remote Code Execution
  8 WordPress And Earlier Multiple Vulnerabilities
  9 Mambo Multiple Vulnerabilities
10 Multiple Vulnerabilities In phpWebsite
Need Secure Code?
Quick Search
You can use the form below to search our site. Just enter the keywords to search.
Home Services Archives Research Downloads Contact
HiveMail Multiple Vulnerabilities
February 10, 2022
Vendor : HiveMail
Version : HiveMail <= 1.3
Risk : Multiple Vulnerabilities

HiveMail is a powerful web-based email program that allows you to offer personal email accounts to your visitors. This makes HiveMail a popular choice for business and individuals alike. Unfortunately there are a number of remote code execution vulnerabilities in HiveMail due to unsafe eval calls that may allow an attacker to compromise the underlying web server. In addition there are also vulnerabilities that allow an attacker to perform SQL Injection and Cross Site Scripting attacks.

Remote Code Execution:
There are a substantial number of Remote Code Execution issues in HiveMail that allow for an attacker to easily execute php code on the target server. Lets have a look at the file named addressbook.update.php @ lines 273-300
if ($_POST['cmd'] == 'remove') {
	if ($contactgroupid == 0) {
	if (!is_array($contactcheck)) {
	$groupcontents = $DB_site->query_first("
		SELECT contacts
		FROM hive_contactgroup
		WHERE contactgroupid = $contactgroupid
		AND userid = $hiveuser[userid]
	$groupcontent = explode(',', $groupcontents['contacts']);
	foreach ($contactcheck as $bookid => $doit) {
		if ($doit == 'yes') {
			$key = array_search($bookid, $groupcontent);
			array_splice($groupcontent, $key, 1);
		UPDATE hive_contactgroup
		SET contacts = '".addslashes(implode(',', $groupcontent))."'
		WHERE contactgroupid = $contactgroupid
		AND userid = $hiveuser[userid]
	eval(makeredirect("redirect_addbook_removeentries", "addressbook.view.php

In the above code the variable $contactgroupid is taken from user supplied data. There are a few obstacles to bypass in order for there to be Code Execution, but it is nothing too complicated.



The above command would successfully set $contactgroupid to a value grater than zero, not cause an SQL Error, and eventually get executed @ line 299. It should be noted though that even if code execution isn't possible then SQL Injection within the same variable $contactgroupid is. This same type of issues takes place in a number of locations within HiveMail.



The files calendar.event.php, index.php,, read.bounce.php, rules.block.php, language.php and possibly others contain vulnerable code very similar to that which I pointed out earlier.

Cross Site Scripting & SQL Injection:
Hivemail is vulnerable to cross site scripting because it makes use of unsanitized $_SERVER['PHP_SELF'] references.


Once logged in a malicious attacker could replace the code above with the variable folderid containing a malicious SQL statement and have it executed.

The vendor was unresponsive to my contact attempts, and according to some of the people on the HiveMail forums the project has been fairly dormant as of late.

Until an updated version of HiveMail is released users are very strongly advised to not use this vulnerable application.

James Bercegay of the GulfTech Security Research Team