Sablier

Sablier
DeFiFoundry
53,440 USDC
View results
Submission Details
Severity: low
Invalid

Merkle proof length is not verified

Summary

The contracts SablierV2MerkleLL.sol and SablierV2MerkleLT.sol do not verify the length of the merkleProof bytes32 array that is passed as parameter in claim function.

Vulnerability Details

This vulnerability does not threaten the security of the protocol, but is a common development practice to verify the length of the merkleProof when a contract interacts with Merkle Trees and also saves gas costs.

Tools Used

Manual review

Recommendations

Consider verifying the length of the merkleProof bytes32 array that is passed as parameter in claim function of SablierV2MerkleLT.sol and SablierV2MerkleLL.sol contracts :

function claim(
uint256 index,
address recipient,
uint128 amount,
bytes32[] calldata merkleProof
)
external
override
returns (uint256 streamId)
{
+ require(merkleProof.length > 0, "SablierV2Merkle: invalid proof length");
// Generate the Merkle tree leaf by hashing the corresponding parameters. Hashing twice prevents second
// preimage attacks.
bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(index, recipient, amount))));
// ...
}
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Info/Gas/Invalid as per Docs

https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.