The withdrawAllFailedCredits function should follow the check-effect-interact pattern to prevent reentrancy attacks. This ensures atomic operations and prevents malicious contracts from manipulating state during external calls.
The specific issue is that the function makes an external ETH transfer call before updating the contract state, creating a potential reentrancy vulnerability where malicious contracts could re-enter the function during the external call while state is inconsistent.
Likelihood:
Reentrancy attacks require malicious contracts to be deployed
Any user can trigger the reentrancy pattern by calling with malicious contracts
Requires specific conditions but is technically exploitable
Impact:
Potential state manipulation during external calls
Violation of security best practices (check-effect-interact)
Could lead to more complex attack vectors when combined with other vulnerabilities
Risk of double-spending or state corruption scenarios
Reentrancy window exists during external ETH transfer when state is inconsistent:
Update state before external calls to prevent reentrancy.
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.