Intended Functionality :
The failedTransferCredits mapping stores ETH amounts that failed to transfer during payouts
When a transfer fails in _payout, it stores the amount
Users should be able to later withdraw their failed credits
The vulnerability stems from poor access control design where:
The function accepts an arbitrary address parameter
It fails to validate the relationship between the caller and the credit owner
It updates the wrong storage variable during withdrawal
Likelihood: Medium
The likelihood is considered Medium because:
The vulnerability requires specific conditions to be exploitable:
There must be failed transfers in the system
The contract must have ETH balance from these failed transfers
The attacker needs to identify addresses with failed transfer credits
Impact: Medium
The vulnerability allows:
Unauthorized withdrawal of other users' failed transfer credits
Potential for multiple withdrawals of the same credits since wrong balance is zeroed
Loss of funds for legitimate users who experienced failed transfers
This PoC demonstrates that:
Failed transfers are easily triggered using contract mechanics
The vulnerability is straightforward to exploit
Multiple attackers can exploit the same failed transfer credits
No special permissions or complex setup required
The attack can be repeated until all funds are drained
Implement the fixed version of the function that:
Removes the _receiver parameter
Only allows users to withdraw their own failed transfer credits
Properly updates the credit balance of the withdrawing user
Adds relevant events for better tracking and transparency
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.