The organizer signature used in deployProxyAndDistributeBySignature() to execute a distribution can be replayed for any other implementation, as this address isn't included in the hashed payload used to validate the signature.
The deployProxyAndDistributeBySignature() function present in the factory contract can be used to execute a meta-transaction to deploy and distribute a contest on behalf of the organizer.
The implementation relies on a signature that must be crafted by the organizer account. The function hashes the contestId and data payload to produce a digest, that is then used to recover the signer using the given signature, and validates that the signer is in fact the organizer.
Contests, besides having an id and an organizer, are set up using an implementation address which represents the implementation of the distribution contract. Even though the implementation input variable is validated by calculating the salt and checking that its associated close time is not zero (which means it was effectively set up by the owner), this variable isn't part of the signature. A signature will be valid for any implementation value, as long as the organizer and contest id stay the same.
This means that a bad actor can use the signature included in a transaction to deployProxyAndDistributeBySignature() to replay the distribution of a different contest (same organizer and id, different implementation). For example this can be used by the winner of a previous contest to execute the distribution of a different contest, which will end up sending the new distribution tokens to himself, or it can just be abused by a griefer to disrupt the protocol.
In the following test, the signature created first by the organizer for the contest with implementationA is later replayed by an attacker for the contest with implementationB.
Note: the snippet shows only the relevant code for the test. Full test file can be found here.
Medium. The signature included in deployProxyAndDistributeBySignature() can be used to replay the distribution of a different contest.
None.
Add the implementation address to the hashed payload (also see submission "Invalid EIP-712 signature schema" related to how to properly structure the EIP-712 signature).
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.