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

Arbitrary `from` in unchecked `transferFrom` in the `MoneyShelf` contract makes protocol accessible to an unauthorized user

Summary

MoneyShelf::depositUSDC uses arbitrary from in transferFrom allowing funds to transfer to an unauthorized user. Additionally the return value of transferFrom call is not checked.

Vulnerability Details

Detect when msg.sender is not used as from in transferFrom.

Impact

The attacker calls the MoneyShelf::depositUSDC while specifying the sender's address as from in transferFrom, allowing the attacker to steal the user's tokens. The attacker could also set the return value of transferFrom.

Tools Used

Slither

Recommendations

Use msg.sender as from in transferFrom. Additionally, use SafeERC20, or ensure that the transferFrom return value is checked.

Updates

Lead Judging Commences

n0kto Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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