The createMerkleLL()
and createMerkleLT
functions deploys a new SablierV2MerkleLL
and SablierV2MerkleLT
contracts respectively using the CREATE
, where the address derivation depends only on the SablierV2MerkleLockupFactory
nonce. This implementation results in reorg attacks and loss of funds. Re-orgs can happen in all EVM chains and as confirmed the contracts will be deployed on most EVM compatible L2s including Arbitrum, etc. It is also planned to be deployed on ZKSync also.
This is how Airstreams work:
An Airstream campaign creator deploys an instance of a campaign using CampaignFactory
and transfers funds to the instance. Recipients will then claim the funds. The vulnerability lies in the fact that createMerkleLL()
and createMerkleLT()
use CREATE
to deploy SablierV2MerkleLL
and SablierV2MerkleLT
instances.
Imagine the following scenario
Alice deploys a SablierV2MerkleLL
instance.
Alice sends funds to the deployed SablierV2MerkleLL
instance.
A network block reorganization (reorg) occurs.
Bob notices the block reorg and calls createMerkleLL()
.
Bob's call creates a SablierV2MerkleLL
instance with an address identical to the one Alice initially sent funds to.
Alice's transactions are executed post-reorg.
Alice's funds are now transferred to the SablierV2MerkleLL
instance controlled by Bob's campaign.
References:
This is a Medium severity issue that has been referenced from below Code4rena reports:
https://code4rena.com/reports/2023-01-rabbithole/#m-01-questfactory-is-suspicious-of-the-reorg-attack
https://code4rena.com/reports/2023-04-frankencoin#m-14-re-org-attack-in-factory
https://protos.com/polygon-hit-by-157-block-reorg-despite-hard-fork-to-reduce-reorgs/
Theft of funds from the campaign creator, and the attacker decides the recipients and admin of the campaign.
Manual review
Deploy such contracts via create2 with salt that includes msg.sender.
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.