The claimFaucetTokens function in RaiseBoxFaucet sends ETH to the caller before updating internal state. If the caller is a contract, its fallback function can re-enter claimFaucetTokens and claim tokens/ETH multiple times in a single transaction, bypassing the intended limits.
External call before internal state update violates the (CEI) pattern, enabling reentrancy. As a result, a malicious contract can repeatedly call claimFaucetTokens in a single transaction, draining the faucet.
Likelihood: High
The vulnerable code pattern is present in every call to claimFaucetTokens, so exploitation is possible whenever the faucet is funded and accessible.
Any attacker can deploy a contract with a fallback function and immediately exploit the vulnerability as soon as they interact with the faucet, regardless of user protections or limits.
Impact:
Any attacker can drain the faucet’s tokens and ETH by exploiting reentrancy, bypassing daily claim limits and cooldowns. This can result in complete loss of faucet funds.
Place the following into RaiseBoxFaucet.t.sol:
Update all states before making any external calls (CEI Pattern), or use OpenZeppelin’s ReentrancyGuard.
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.