Description:
Location in Code: The withdraw
function.
The contract updates the bidder's balance (bid_values
) after making an external call to the ERC20 token contract.
This sequence allows for a reentrancy attack, where a malicious contract could repeatedly call withdraw
before their balance is updated.
Impact:
Unauthorized withdrawals leading to loss of funds from the contract.
Compromises the security and integrity of the auction process.
Proof of Code:
Recommendation:
Update state before external calls to prevent reentrancy attacks.
Modify the withdraw
function to update the bidder's balance before transferring tokens.
Corrected Code:
Implement reentrancy guards if necessary.
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.