The graduateAndUpgrade
function currently verifies authorization for the upgrade but does not invoke the upgrade itself. Without a call to upgradeTo
, the new implementation address is not set, and the contract remains on the old version despite appearing to initiate an upgrade.
The graduateAndUpgrade
function is intended to allow the principal to authorize and execute an upgrade to a new implementation contract. While the function includes a call to _authorizeUpgrade(_levelTwo)
, which verifies that the caller has permission to initiate an upgrade, it fails to include the actual upgrade execution through a call to upgradeTo(_levelTwo)
. As a result, even if the caller is authorized, the contract does not transition to the new implementation, effectively rendering the upgrade incomplete.
The failure to execute the upgrade means that any expected logic changes or patches in the new contract version will not take effect. This can lead to unexpected behavior, stale code execution, and a false sense of security, especially in critical upgrade paths. In a worst-case scenario, it could leave known vulnerabilities unpatched despite appearing to have performed an upgrade.
Manual Review
To properly execute the upgrade, the call to upgradeTo(_levelTwo)
should be made directly, as it already handles the authorization check internally.
This guarantees that once authorization is confirmed, the contract transitions to the new implementation address.
The system doesn't implement UUPS properly.
The system doesn't implement UUPS properly.
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.