hats-finance / Tapioca-0xe0b920d38a0900af3bab7ff0ca0af554129f54ad

1 stars 2 forks source link

Exploit Overflow of Vesting Contract #33

Open hats-bug-reporter[bot] opened 1 month ago

hats-bug-reporter[bot] commented 1 month ago

Github username: -- Twitter username: -- Submission hash (on-chain): 0x2298a7229249126b148bc078af30dd6aa987e7b617224c045c4068f1e437844d Severity: high

Description: Description\ The Vesting smart contract, designed for distributing tokens with vesting, contains a potential vulnerability related to the init function due to the absence of the safeMath library. This function allows specifying _initialUnlock percentage to unlock a part of tokens immediately after initialization.

Attack Scenario\ An attacker can exploit a vulnerability in the Vesting contract's registerUsers function to manipulate the totalRegisteredAmount.The attacker deploys a helper malicious contract.exploitOverflow. with the address of the target Vesting contract.The attacker creates two arrays: 1)users( Contains two special addresses (often 0 addresses)) 2) amounts (Contains two values):

Attachments

  1. Proof of Concept (PoC) File

  2. Revised Code File (Optional)

Files:

0xRektora commented 4 weeks ago