The function MoneyShelf::depositUSDC uses arbitrary from and to address.
Passing an arbitrary from address to transferFrom (or safeTransferFrom) can lead to loss of funds, because anyone can transfer tokens from the from address if an approval is made.
If an approval has been made, an attacker can call the MoneyShelf::depositUSDC function and pass the user's address as the account parameter and their address as the to parameter, hence sending user's funds to the MoneyShelf and stealing the tokens the user is meant to recieve for depositing USDC (CrimeMoney tokens).
User approves MoneyShelf to spend thier USDC
Attacker calls the MoneyShelf::depositUSDC function and pass the user's address as the account parameter and their address as the to parameter.
Attacker steals users crimeeMoney tokens.
Slither
Aderyn
Use msg.sender in place of the account and to parameters.
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.