Anyone can drain the staking pool by calling Staking.withdraw() as there is no check whether the caller has any balance.
There is no check when calling Staking.withdraw() whether the caller has any tokens to withdraw so they can withdraw the whole amount of the pool without causing a revert.
updateFor(msg.sender) calls the update() function which sets the index and balance.
updateFor if there is no balances[recipient] just sets the supplyIndex like so:
A malicious user can empty the pool funds so this is a high severity issue.
Manual review
Add the following check in the withdraw function:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.