upgrade function is not protected
The upgrade function calls _authorizeUpgrade, which is marked with the onlyOwner modifier, the upgrade function itself is not restricted. This means that anyone can call the upgrade function, and only the internal _authorizeUpgrade check is protected.
This is problematic because:
It allows non-owners to initiate the upgrade process, even though they shouldn't be able to pass the authorization check.
It may lead to unnecessary gas consumption as non-owners can cause the contract to execute part of the upgrade logic before reverting.
It could potentially be exploited if there's any side effect in the code before the _authorizeUpgrade check.
The _authorizeUpgrade function is empty, which means it doesn't actually perform any checks on the branchUpgrades parameter.
It may lead to unnecessary gas consumption as non-owners can cause the contract to execute part of the upgrade logic before reverting.
Manual Review
The upgrade function should also be restricted to the owner
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.