buySnow is designed to support either ETH payments or WETH payments for buying Snow tokens. When paying with WETH, no ETH should be sent (msg.value == 0). When paying with ETH, the exact ETH amount must be provided.
In the WETH payment path, there is no check that msg.value is zero.
If a user sends a non-zero msg.value that does not match s_buyFee * amount, the ETH path is skipped and the WETH transfer path executes instead—silently accepting ETH that was not intended to be paid.
This leads to unintended ETH being lost by the user
Likelihood:
Occurs whenever a user mistakenly sends ETH while intending to pay with WETH
Impact:
User will lost their ETH, and the funds can only be recovered by the fee collector, not the user
Explicitly enforce msg.value == 0 in the WETH branch.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.