Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: high
Invalid

WithdrawFees potentially sends eth to an arbitrary user

Summary

The function of PuppyRaffle.withdrawFees() could sends eth to an arbitrary user and could potentially allow an attacker to drain the contract of its funds

Vulnerability Details

The function sends ether to an external address (feeAddress.call{value: feesToWithdraw}("")) and then continues to execute further logic. It also has no access control mechanisms, meaning any address can call this function and withdraw the fees.

Impact

This could potentially open up a reentrancy attack if the recipient is a contract that has a fallback function that calls back into the withdrawFees function. Finally, this could potentially allow an attacker to drain the contract of its funds.

Tools Used

Slither, Manual Review

Recommendations

Need to ensure that an arbitrary user cannot withdraw unauthorized funds.

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 2 years ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!