The claim function is expected to prevent the same treasure from being claimed more than once by checking whether it has already been claimed and revert with AlreadyClaimed if the treasure has already been collected.
However, the duplicate claim validation checks claimed[_treasureHash] using the immutable state variable _treasureHash instead of checking against the actual treasureHash function parameter. As a result, the lookup always reads an unrelated mapping slot, allowing the same treasure to be claimed up to 10 times.
Likelihood: High
Every valid proof can be replayed by any participant up to 10 times, since the validation never prevents a second claim for the same treasureHash.
Impact: High
An attacker can drain the entire contract balance by replaying a single valid proof.
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.
The contest is complete and the rewards are being distributed.