The lack of input parameter sanitization in V2Merkle contracts prevents anyone from claiming airstreams.
3 contracts are affected with this bug:
SablierV2MerkleLL
:
In this contract, a malicious creator can exploit the streamDurations_
variable. By setting the total variable in the streamDurations_
struct to 0
, the creation of a Lockup Linear stream becomes impossible. This parameter causes the timestamps.start
and timestamps.end
to always be equal, resulting in a revert:
As a result, no Lockup Linear stream can be created.
SablierV2MerkleLT
:
In this contract, a malicious creator can manipulate the unlockPercentage
variable within the TrancheWithPercentage
struct. By inputting a value like 1.1e18, representing a percentage greater than 100%, the calculatedAmountsSum
variable will exceed the calculatedAmount
variable in the _calculateTranches
function. This situation renders the creation of any Lockup Tranched stream impossible and results in a revert.
As a result, no Lockup Tranched stream can be created.
SablierV2MerkleLockupFactory
:
In this contract, a malicious creator can apply the same manipulation as described in point 1 to the createMerkleLL
function. This action once again makes it impossible to create any Lockup Linear streams.
As observed in all three cases, recipients are unable to claim their tokens even after the contract has been deployed.
Due to the aforementioned issue, the SablierV2MerkleLL
, SablierV2MerkleLT
and SablierV2MerkleLockupFactory
contracts are affected.
A malicious creator can set parameters in such a way that recipients cannot create a Lockup stream and thus cannot claim any tokens. Due to the lack of input parameter sanitization, SablierV2MerkleLL
and SablierV2MerkleLT
contracts can be created even when the parameters provided by the malicious creator do not allow the creation of any Lockup Streams. Because these two contracts can be deployed, a malicious creator can mislead recipients into believing in the fairness of their airdrop, thus exploiting the recipients.
In the case of the SablierV2MerkleLockupFactory
contract, although the createMerkleLT
function has logic to prevent incorrect parameters, the createMerkleLL
function does not. This allows the malicious creator to exploit this vulnerability once again.
Manual Review
Incorporate the checkCreateLockupLinear
and checkCreateLockupTranched
functions from the helper
contract into the constructors of the SablierV2MerkleLL
and SablierV2MerkleLT
contracts respectively, to ensure these contracts are created only with valid parameters.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.