Lacking proper access control in Chainlink staking contract's removeOperator() function and OperatorVCS contract's queueVaultRemoval() and removeVault() functions can lead into disrupting services.
Because we don't have real implementation of Chainlink staking contract so we use this StakingMock contract to demonstrate the exploit. If this contract is implemented as same as this mock contract, we will leave the Chainlink staking system vulnerable.
2024-09-stakelink/contracts/linkStaking/test/StakingMock.sol
2024-09-stakelink/contracts/linkStaking/OperatorVCS.sol
Steps to remove an operator vault:
Calling Chainlink staking contract's removeOperator()
Calling OperatorVCS contract's queueVaultRemoval()
Calling OperatorVCS contract's removeVault()
There is no explicit indication that above functions are protected by any access control.
Anyone can call those functions to remove any operator vault, posing a significant security threat to the integrity and functionality of your system.
Attacker: Anyone can be an attacker
Hardhat test script
Apply onlyOwner modifier to restrict access:
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.