When the contract cannot directly send ETH to a recipient (the transfer fails), it should add the failed amount to failedTransferCredits[recipient]. Only that recipient should be allowed to withdraw their credited funds, and withdrawal should zero the recipient's credit.
The function withdrawAllFailedCredits(address _receiver) reads failedTransferCredits[_receiver] but sets failedTransferCredits[msg.sender] = 0 before transferring ETH to msg.sender. This allows any caller to withdraw another account’s credits and does not clear the victim’s credit entry, enabling repeated thefts until the contract runs out of ETH.
Likelihood:** High**
Payouts frequently fail when recipients are contracts that do not implement receive()/fallback() or intentionally reject ETH.
No permission checks restrict who can call withdrawAllFailedCredits(address), so any EOAs/contracts can call it and claim someone else's credit.
Impact: High
Attackers can withdraw ETH that belongs to others, directly stealing funds from the marketplace.
Because the victim's credit is not cleared, the attacker may repeat the withdrawal multiple times until the marketplace runs out of funds.
Append the following test to BidBeastsMarketPlaceTest.t.sol and run forge test --mt test_withdrawal_poc -vv
Prevent users from withdrawing other accounts’ credits by removing the _receiver parameter and only allowing msg.sender to withdraw their own.
withdrawAllFailedCredits allows any user to withdraw another account’s failed transfer credits due to improper use of msg.sender instead of _receiver for balance reset and transfer.
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.