CVE-2022-0266 (published 2022-01-19T06:15Z)

Authorization Bypass Through User-Controlled Key in Packagist remdex/livehelperchat prior to 3.92v.

Severity: MEDIUM
CVSS v2 base score: 6.0 (AV:N/AC:M/Au:S/C:P/I:P/A:P)
CVSS v3 base score: 6.6, MEDIUM (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-639
cwe_name: Authorization Bypass Through User-Controlled Key
description: The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.
extended_description: 
            Retrieval of a user record occurs in the system based on some key value that is under user control. The key would typically identify a user-related record stored in the system and would be used to lookup that record for presentation to the user. It is likely that an attacker would have to be an authenticated user in the system. However, the authorization process would not properly check the data access operation to ensure that the authenticated user performing the operation has sufficient entitlements to perform the requested data access, hence bypassing any other authorization checks present in the system.
            For example, attackers can look at places where user specific data is retrieved (e.g. search screens) and determine whether the key for the item being looked up is controllable externally. The key may be a hidden field in the HTML form field, might be passed as a URL parameter or as an unencrypted cookie variable, then in each of these cases it will be possible to tamper with the key value.
            One manifestation of this weakness is when a system uses sequential or otherwise easily-guessable session IDs that would allow one user to easily switch to another user's session and read/modify their data.
         
         

Fix information:
repo_url: https://github.com/livehelperchat/livehelperchat
commit_details: repo_url: https://github.com/livehelperchat/livehelperchat
author: Remigijus Kiminas
author_date: 2022-01-18 00:18:36-05:00
msg: Display logic should match backand logic
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: delete.php
change_type: ModificationType.MODIFY
diff: @@ -10,6 +10,11 @@ if ($currentUser->getUserID() == $Params['user_parameters']['user_id']) {
     exit;
 }
 
+if ((int)$Params['user_parameters']['user_id'] == 1) {
+    die('admin account never can be deleted!');
+    exit;
+}
+
 $departament = erLhcoreClassUser::getSession()->load( 'erLhcoreClassModelUser', $Params['user_parameters']['user_id']);
 erLhcoreClassUser::getSession()->delete($departament);
 

programming_language: PHP
filename: deletegroup.php
change_type: ModificationType.MODIFY
diff: @@ -5,6 +5,11 @@ if (!$currentUser->validateCSFRToken($Params['user_parameters_unordered']['csfr'
 	exit;
 }
 
+if ((int)$Params['user_parameters']['group_id'] == 1) {
+    die('admin account never can be deleted!');
+    exit;
+}
+
 erLhcoreClassGroup::deleteGroup((int)$Params['user_parameters']['group_id']);
 
 erLhcoreClassAdminChatValidatorHelper::clearUsersCache();

programming_language: PHP