Description: Inside LevelOne::graduateAndUpgrade
, the code calls _authorizeUpgrade(_levelTwo)
directly instead of performing 'upgradeToAndCall' on the proxy. The signature doesn't accept the 'bytes data' parameter and the redundant _authorizeUpgrade(_levelTwo)
is never sufficient to change implementation.
Impact: Students never actually get upgraded to LevelTwo, the intended proxy call is never invoked. This breaks the upgrade flow and leaves the contract in an inconsistent state.
Proof of Concept: Include the following test in the LevelOneAndGraduateTest.t.sol
file:
Recommended Mitigation:
Change signature to function graduateAndUpgrade(address _levelTwo, bytes memory data)
Remove direct _authorizeUpgrade(_levelTwo)
call
Use upgradeToAndCall(_levelTwo, data)
on the proxy so that _authorizeUpgrade
is invoked internally and the new implementation is executed immediately.
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.