Submitted by josephdara, also found by 3docSec
The functions above can be used to swap tokens, however the swaps are not sent to the provided address. Instead they are sent to the msg.sender.
This could cause issues if the user has been blacklisted on a token. Or if the user has a compromised signature/allowance of the target token and they attempt to swap to the token, the user loses all value even though they provided an destination address.
Here is one of the many functions with this issue, as we can see after the swap is completed, tokens are sent back to the msg.sender from the router not to the to address.
Manual Review.
Uniswap Router: https://github.com/Uniswap/v3-periphery/blob/main/contracts/SwapRouter.sol
The uniswap router supports inputting of a destination address. Hence the router should be called with the to address not the msg.sender.
Else remove the address to from the parameter list.
Keref (Good Entry) confirmed, but disagreed with severity and commented:
gzeon (Judge) decreased severity to Medium and commented:
Keref (Good Entry) commented:
gzeon (Judge) commented:
Good Entry Mitigated:
Status: Mitigation confirmed. Full details in reports from kutugu, xuwinnie and 3docSec.
