Closed code423n4 closed 1 year ago
A known centralized issue in the bot.
raymondfam marked the issue as low quality report
raymondfam marked the issue as duplicate of #69
raymondfam marked the issue as remove high or low quality report
HickupHH3 changed the severity to QA (Quality Assurance)
Lines of code
https://github.com/GenerationSoftware/pt-v5-vault-boost/blob/9d640051ab61a0fdbcc9500814b7f8242db9aec2/src/VaultBooster.sol#L142 https://github.com/GenerationSoftware/pt-v5-vault-boost/blob/9d640051ab61a0fdbcc9500814b7f8242db9aec2/src/VaultBooster.sol#L171 https://github.com/GenerationSoftware/pt-v5-vault-boost/blob/9d640051ab61a0fdbcc9500814b7f8242db9aec2/src/VaultBooster.sol#L188
Vulnerability details
Impact
Anyone can create a VaultBooster using the VaultBoosterFactory, then the owner sets a configuration to a specific token.
The problem is that the owner can change the
_boosts[_token]
data even when the data has been configured. Please see the next scenario:liquidation pair
toaddress(0)
using the setBoost() function.address(0)
.The malicious
VaultBooster
owner can steal funds from others.Proof of Concept
The
setBoost()
function allows the owner to modify the_boosts[_token]
parameters at any time. So the malicious owner can change the liquidation pair to zero address making to be unable to liquidate the users's deposited funds by a legitimate vault.Then the malicious owner can withdraw users's deposited funds:
The deposit to the
VaultBooster
can be by anyone:Tools used
Manual review
Recommended Mitigation Steps
Add a validation that the _boosts[_token] can not be changed by the owner once the
boosts[token]
is configured.Assessed type
Invalid Validation