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

User can deposit approved money of other users

Summary

A user can deposit money previously approved of another user.

Vulnerability Details

The problem relies on the address as a parameter.

function depositTheCrimeMoneyInATM(address account, address to, uint256 amount) external {
moneyShelf.depositUSDC(account, to, amount);

Impact

Users can provide address of another user who already approved money for this contract.

Tools Used

Manual review

Recommendations

Make this change to the code:

- function depositTheCrimeMoneyInATM(address account, address to, uint256 amount) external {
+ function depositTheCrimeMoneyInATM(address to, uint256 amount) external {
- moneyShelf.depositUSDC(account, to, amount);
+ moneyShelf.depositUSDC(msg.sender, to, amount);
}
Updates

Lead Judging Commences

n0kto Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Arbitrary account deposit, steal approval

Support

FAQs

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