withdrawAllFailedCredits() FunctionSeverity: High
Impact: Fund Theft
Likelihood: High
Description:
The withdrawAllFailedCredits() function contains a critical access control bug that allows any user to withdraw failed transfer credits belonging to other users.
Vulnerable Code:
Attack Scenario:
Alice has 1 ETH in failedTransferCredits[Alice]
Bob calls withdrawAllFailedCredits(Alice)
Bob receives Alice's 1 ETH while Alice's credits remain unchanged
Bob can repeat this to drain Alice's credits entirely
Proof of Concept:
Attack Steps:
Deploy exploit contract
Call stealCredits(victimAddress)
Attacker receives victim's failed transfer credits
Victim's credits remain in mapping, can be drained repeatedly
Recommended Mitigation:
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.