The UpgradeBranch
contract is vulnerable to reinitialization attacks due to the absence of the _disableInitializers()
function call. This allows an attacker to reinitialize the contract, potentially changing the owner and gaining unauthorized control over the contract's upgrade process.
The UpgradeBranch
contract inherits the OwnableUpgradeable
and Initializable
contracts but fails to call the _disableInitializers
function as seen in the following code;
An attacker could re-initialize the contract, setting themselves as the owner and gaining control over the contract's functionality, therefore, critical functions protected by onlyOwner
for example _authorizeUpgrade()
function could be exploited by the attacker.
Manual Review
Ensure to invoke _disableInitializers
function within the contract's constructor to prevent the implementation contract from being initialized.
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.