CVE-2019-25157 (published 2023-12-19T03:15Z)

A vulnerability was found in Ethex Contracts. It has been classified as critical. This affects an unknown part of the file EthexJackpot.sol of the component Monthly Jackpot Handler. The manipulation leads to improper access controls. It is possible to initiate the attack remotely. This product does not use versioning. This is why information about affected and unaffected releases are unavailable. The patch is named 6b8664b698d3d953e16c284fadc6caeb9e58e3db. It is recommended to apply a patch to fix this issue. The associated identifier of this vulnerability is VDB-248271.

CVSS v3 base score: 4.3, MEDIUM (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N)

Weakness information:
cwe_id: CWE-284
cwe_name: Improper Access Control
description: The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.
extended_description: 
            Access control involves the use of several protection mechanisms such as:
            
               Authentication (proving the identity of an actor)
               Authorization (ensuring that a given actor can access a resource), and
               Accountability (tracking of activities that were performed)
            
            When any mechanism is not applied or otherwise fails, attackers can compromise the security of the product by gaining privileges, reading sensitive information, executing commands, evading detection, etc.
            There are two distinct behaviors that can introduce access control weaknesses:
               
                  Specification: incorrect privileges, permissions, ownership, etc. are explicitly specified for either the user or the resource (for example, setting a password file to be world-writable, or giving administrator capabilities to a guest user). This action could be performed by the program or the administrator.
                  Enforcement: the mechanism contains errors that prevent it from properly enforcing the specified access control requirements (e.g., allowing the user to specify their own privileges, or allowing a syntactically-incorrect ACL to produce insecure settings). This problem occurs within the program itself, in that it does not actually enforce the intended security policy that the administrator specifies.
               
         
		 

Fix information:
repo_url: https://github.com/ethex-bet/ethex-contracts
commit_details: repo_url: https://github.com/ethex-bet/ethex-contracts
author: ethexbet
author_date: 2019-06-26 19:38:48+00:00
msg: Security vulnerability issue fixed

Issue described here https://bitcointalk.org/index.php?topic=5120151.msg50827730#msg50827730
repository: repo_url: https://github.com/ethex-bet/ethex-contracts
repo_name: ethex-bet/ethex-contracts
description: This smart-contracts are the parts of Ethex Lottery fair game
repo_language: JavaScript
owner: ethex-bet
file_changes: filename: EthexJackpot.sol
change_type: ModificationType.MODIFY
diff: @@ -209,18 +209,17 @@ contract EthexJackpot {
         if (seasonalPayAmount > 0)
             getAddress(seasonalWin).transfer(seasonalPayAmount);
     }
-    
+
     function paySuperPrize(address payable winner) external onlyLoto {
         uint256 superPrizeAmount = dailyAmount + weeklyAmount + monthlyAmount + seasonalAmount;
+        dailyAmount = 0;
+        weeklyAmount = 0;
+        monthlyAmount = 0;
+        seasonalAmount = 0;
         emit SuperPrize(superPrizeAmount, winner);
         winner.transfer(superPrizeAmount);
     }
     
-    function loadTickets(address payable[] calldata addresses, uint256[] calldata numbers) external {
-        for (uint i = 0; i < addresses.length; i++)
-            tickets[numbers[i]] = addresses[i];
-    }
-    
     function setOldVersion(address payable oldAddress) external onlyOwner {
         previousContract = EthexJackpot(oldAddress);
         dailyStart = previousContract.dailyStart();
@@ -252,7 +251,9 @@ contract EthexJackpot {
         weeklyAmount = previousContract.weeklyAmount();
         monthlyAmount = previousContract.monthlyAmount();
         seasonalAmount = previousContract.seasonalAmount();
-        firstNumber = numberEnd;
+        firstNumber = weeklyNumberStart;
+        for (uint256 i = firstNumber; i <= numberEnd; i++)
+            tickets[i] = previousContract.getAddress(i);
         previousContract.migrate();
     }
     

programming_language: Java