CVE-2021-4177 (published 2021-12-28T06:15Z)

livehelperchat is vulnerable to Generation of Error Message Containing Sensitive Information

Severity: MEDIUM
CVSS v2 base score: 5.0 (AV:N/AC:L/Au:N/C:P/I:N/A:N)
CVSS v3 base score: 5.3, MEDIUM (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N)

Weakness information:
cwe_id: CWE-209
cwe_name: Generation of Error Message Containing Sensitive Information
description: The product generates an error message that includes sensitive information about its environment, users, or associated data.
extended_description: The sensitive information may be valuable information on its own (such as a password), or it may be useful for launching other, more serious attacks. The error message may be created in different ways:
           
             self-generated: the source code explicitly constructs the error message and delivers it
	     externally-generated: the external environment, such as a language interpreter, handles the error and constructs its own message, whose contents are not under direct control by the programmer
	   
	 An attacker may use the contents of error messages to help launch another, more focused attack. For example, an attempt to exploit a path traversal weakness (CWE-22) might yield the full pathname of the installed application. In turn, this could be used to select the proper number of ".." sequences to navigate to the targeted file. An attack using SQL injection (CWE-89) might not initially succeed, but an error message could reveal the malformed query, which would expose query logic and possibly even passwords or other sensitive information used within the query.
         

Fix information:
repo_url: https://github.com/livehelperchat/livehelperchat
commit_details: repo_url: https://github.com/livehelperchat/livehelperchat
author: Remigijus Kiminas
author_date: 2021-12-27 01:37:08-05:00
msg: Disable to change city database location
repository: repo_url: https://github.com/livehelperchat/livehelperchat
repo_name: LiveHelperChat/livehelperchat
description: Live Helper Chat - live support for your website. Featuring web and mobile apps, Voice & Video & ScreenShare. Supports Telegram, Twilio (whatsapp), Facebook messenger including building a bot.
repo_language: PHP
owner: livehelperchat
file_changes: filename: geoconfiguration.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -128,8 +128,8 @@
       	</p>
 
       	                        <div class="form-group">
-								    <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers','Location of city database'); ?></label> 
-								    <input class="form-control" type="text" name="CityGeoLocation" value="<?php isset($geo_data['max_mind_city_location']) && ($geo_data['max_mind_city_location'] != '') ?  print htmlspecialchars($geo_data['max_mind_city_location']) : print 'var/external/geoip/GeoLite2-City.mmdb' ?>" />
+								    <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers','Location of city database. Make sure you uploaded file in this location.'); ?></label>
+								    <input class="form-control" type="text" readonly value="<?php isset($geo_data['max_mind_city_location']) && ($geo_data['max_mind_city_location'] != '') ?  print htmlspecialchars($geo_data['max_mind_city_location']) : print 'var/external/geoip/GeoLite2-City.mmdb' ?>" />
                                 </div>
 								
 								<div class="row">

programming_language: PHP
filename: file.php
change_type: ModificationType.MODIFY
diff: @@ -110,7 +110,7 @@ class ezcBaseFile
      *         not be opened for reading.
      * @return array
      */
-    static public function walkRecursive( $sourceDir, array $includeFilters = array(), array $excludeFilters = array(), $callback, &$callbackContext )
+    static public function walkRecursive( $sourceDir, array $includeFilters, array $excludeFilters, $callback, &$callbackContext )
     {
         if ( !is_dir( $sourceDir ) )
         {

programming_language: PHP
filename: option.php
change_type: ModificationType.MODIFY
diff: @@ -147,8 +147,8 @@ class ezcConsoleOption
      *                                              sign or contain whitespaces.
      */
     public function __construct( 
-        $short = '', 
-        $long, 
+        $short = '',
+        $long = '',
         $type = ezcConsoleInput::TYPE_NONE, 
         $default = null, 
         $multiple = false,

programming_language: PHP
filename: geoconfiguration.php
change_type: ModificationType.MODIFY
diff: @@ -109,9 +109,6 @@ if ( isset($_POST['StoreGeoIPConfiguration']) ) {
         'MaxMindDetectionType' => new ezcInputFormDefinitionElement(
             ezcInputFormDefinitionElement::OPTIONAL, 'string'
         ),
-        'CityGeoLocation' => new ezcInputFormDefinitionElement(
-            ezcInputFormDefinitionElement::OPTIONAL, 'string'
-        ),
         'ipapi_key' => new ezcInputFormDefinitionElement(
             ezcInputFormDefinitionElement::OPTIONAL, 'string'
         ),
@@ -198,15 +195,15 @@ if ( isset($_POST['StoreGeoIPConfiguration']) ) {
             } elseif ($form->UseGeoIP == 'max_mind') {
                 $data['geo_service_identifier'] = 'max_mind';                
                 $data['max_mind_detection_type'] = $form->hasValidData('MaxMindDetectionType') ? $form->MaxMindDetectionType : 'city';
-                $data['max_mind_city_location'] = $form->CityGeoLocation != '' ? $form->CityGeoLocation : 'var/external/geoip/GeoLite2-City.mmdb';
-                          
+                $data['max_mind_city_location'] = 'var/external/geoip/GeoLite2-City.mmdb';
+
                 if ($data['max_mind_detection_type'] == 'city' && !file_exists($data['max_mind_city_location'])) {
                 	$Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers','MaxMind city file does not exists!');
                 } elseif (!file_exists('var/external/geoip/GeoLite2-Country.mmdb')) {
                 	$data['max_mind_detection_type'] = 'country';
                 	$Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers','MaxMind country file does not exists!');
                 }
-                
+
                 if (empty($Errors)) {
 	                $responseDetection = erLhcoreClassModelChatOnlineUser::getUserData('max_mind','94.23.200.91',array('city_file' => $data['max_mind_city_location'],'detection_type' => $data['max_mind_detection_type']));                
 	                if ( $responseDetection == false || !isset($responseDetection->country_code) || !isset($responseDetection->country_name) ) {

programming_language: PHP