code-423n4 / 2024-04-revert-mitigation-findings

1 stars 1 forks source link

H-04 MitigationConfirmed #79

Open c4-bot-7 opened 7 months ago

c4-bot-7 commented 7 months ago

Lines of code

Vulnerability details

C4 issue

H-04: V3Utils.execute() does not have caller validation, leading to stolen NFT positions from users

Comments

When interacting with V3Utils.execute(), EOA users will first need to approve their NFT before calling execute(). This leads to EOA executing two transactions. Unfortunately, V3Utils.execute() does not validate the execute() caller that they are the NFT token owner. This allows a malicious user to create a sandwich between the victim's transactions and use the victim NFT for malicious purpose.

The core of this issue lies in the fact that execute() does not have any validations against the msg.sender.

Mitigation

PR #29

This PR makes several changes for multiple issues. For our purposes with this ticket, we are focused on some of the changes:

Based on the above changes, users are no longer able to utilize a token they do not own within V3Utils.execute() for malicious purposes.

Conclusion

LGTM

c4-judge commented 7 months ago

jhsagd76 marked the issue as satisfactory

c4-judge commented 7 months ago

jhsagd76 marked the issue as confirmed for report