The LevelOne contract has an unprotected initializer function that makes it vulnerable to unauthorized initialization and potential contract takeover. This vulnerability could allow an attacker to gain control of the entire system by initializing the contract with themselves as the principal.
The initialize function in LevelOne.sol uses the initializer modifier from OpenZeppelin's Initializable contract but lacks additional security measures to prevent unauthorized initialization:
Furthermore, the _authorizeUpgrade function is too simplistic:
Slither analysis identified that "LevelOne is an upgradeable contract that does not protect its initialize functions" and warns that "Anyone can delete the contract with: UUPSUpgradeable.upgradeToAndCall(address,bytes)".
The impact of this vulnerability is critical:
Contract Takeover: An attacker could initialize the contract with themselves as the principal, gaining administrative control
Fund Theft: A malicious actor could steal all funds in the bursary
System Destruction: The attacker could delete the contract via the upgradeToAndCall function
Compromise of Educational Integrity: All educational processes could be manipulated
Slither static analysis tool
Manual code review
Strengthen the _authorizeUpgrade Function:
Restrict initialize Function:
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.