Malicious Governance can set malicious bribesProcessor
to steal rewards that are not protected
#134
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
valid
Lines of code
https://github.com/Badger-Finance/vested-aura/blob/v0.0.2/contracts/MyStrategy.sol#L98-L101
https://github.com/Badger-Finance/vested-aura/blob/v0.0.2/contracts/MyStrategy.sol#L107-L113
https://github.com/Badger-Finance/vested-aura/blob/v0.0.2/contracts/MyStrategy.sol#L421-L425
Vulnerability details
Impact
bribesProcessor
is used to receive bribes and reward tokens. However there is almost no check fornewBribesProcessor
insetBribesProcessor
. Malicious governance can set any address asbribesProcessor
. Malicious governance could set an EOA asbribesProcessor
.Proof of Concept
There is almost no check for
newBribesProcessor
insetBribesProcessor
.https://github.com/Badger-Finance/vested-aura/blob/v0.0.2/contracts/MyStrategy.sol#L98-L101
After setting a malicious
bribesProcessor
. Malicious governance can callsweepRewardToken
to steal rewards that are not protected.https://github.com/Badger-Finance/vested-aura/blob/v0.0.2/contracts/MyStrategy.sol#L107-L113
Tools Used
None
Recommended Mitigation Steps
Add a check in
setBribesProcessor
to make sure thatnewBribesProcessor
is a contract.The text was updated successfully, but these errors were encountered: