Normal behavior:
The marketplace should allow an address that has failed transfer credits (credits accumulated when previous ETH transfers to that address failed) to withdraw only their own credits. Withdrawals should correctly zero the credited account and send the funds to that credited account.
Specific issue:
BidBeastNFTMarket::withdrawAllFailedCredits(address _receiver) reads the credit amount from BidBeastNFTMarket::failedTransferCredits[_receiver] but clears the mapping and sends funds to msg.sender. This mismatch allows any caller to withdraw another address's credits by passing that address as _receiver, resulting in theft of users' failed-transfer funds.
Likelihood: High
When any user (or contract) has a non-zero failedTransferCredits entry — this routinely occurs when transfer/call to that recipient reverted (for example, a contract with a rejecting receive()), the mapping holds a positive balance that can be targeted.
When other marketplace interactions lead to failed transfers (bids/refunds) — marketplace workflows regularly attempt transfers to bidders/sellers; one failed transfer is sufficient to create exploitable credits.
Impact: Critical / High
Direct and immediate theft of ETH from other users' credit balances — attacker can drain other users' failedTransferCredits without privileges.
Loss of user funds and marketplace trust; potential regulatory/financial consequences for operator. Also opens path to automated griefing/extraction scripts.
The following Foundry-style test is a minimal PoC that reproduces the exploit — it creates failed-transfer credits for rejector and then shows an ATTACKER withdrawing them by calling BidBeastNFTMarket::withdrawAllFailedCredits(address(rejector)):
Result:
Remove the address parameter and make withdraw operate only on msg.sender. Add an event and (optionally) nonReentrant.
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.