getReward
incorrectly sets msg.sender as receiver instead of owner.
#91
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
🤖_27_group
AI based duplicate group recommendation
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-10-ramses-exchange/blob/236e9e9e0cf452828ab82620b6c36c1e6c7bb441/contracts/CL/gauge/GaugeV3.sol#L452
Vulnerability details
Proof of Concept
getReward
calls_getAllRewards
passing inmsg.sender
as recevier. Since, not only the owner can call the function for a tokenId, the rewards are incorrectly sent to the caller instead of the owner which is a security breach. In cases where the interactions are done through a contract, the rewards might be lost in the contract instead.Recommended Mitigation Steps
Send the rewards to the token owner instead.
Assessed type
Context
The text was updated successfully, but these errors were encountered: