Open code423n4 opened 2 years ago
dmvt marked the issue as primary issue
dmvt changed the severity to 2 (Med Risk)
vince0656 marked the issue as sponsor acknowledged
vince0656 marked the issue as sponsor confirmed
dmvt marked the issue as satisfactory
dmvt marked the issue as selected for report
Lines of code
https://github.com/code-423n4/2022-11-stakehouse/blob/main/contracts/liquid-staking/LiquidStakingManager.sol#L356-L377
Vulnerability details
Impact
DAO or lsd network owner can swap node runner of the smart contract to their own eoa, allowing them to withdrawETH or claim rewards from node runner.
Proof of Concept
there are no checks done when swapping the node runner whether there are funds in the smart contract that belongs to the node runner. Therefore, a malicious dao or lsd network owner can simply swap them out just right after the node runner has deposited 4 ether in the smart wallet.
place poc in LiquidStakingManager.sol
Tools Used
forge
Recommended Mitigation Steps
Send back outstanding ETH and rewards that belongs to node runner if swapping is needed.