Vulnerability Type: Front-Running / Initialization Control
Contract: LevelOne
Component: Constructor Implementation
During examination of the LevelOne smart contract codebase, we identified a significant security risk related to the initialization process of upgradeable contracts. The LevelOne contract extends the OpenZeppelin Initializable and UUPSUpgradeable patterns but critically fails to implement proper initialization protections.
The vulnerability stems from the absence of an initialization blocking mechanism in the contract's constructor:
The missing _disableInitializers() call creates a security gap that breaks the trusted initialization flow of the proxy pattern.
The deployment sequence typically follows these steps:
Deploy LevelOne implementation contract
Deploy ERC1967Proxy pointing to the implementation
Initialize the proxy with business logic parameters
Due to Ethereum's transaction processing model, these steps execute as separate transactions. An attacker monitoring the mempool can identify when the implementation is deployed and exploit the gap between steps 1 and 3:
The attacker can front-run the intended initialization by:
Observing the implementation contract deployment transaction
Submitting a competing transaction with higher gas to call initialize() directly on the implementation
Setting themselves as the principal, gaining administrative privileges
Administrative Control: An attacker could seize control of the implementation contract
Attacker gain funds of principal
Function Access: Unauthorized access to privileged functions:
School management (addTeacher, removeTeacher, expel)
System operation (startSession)
Upgrade controls (graduateAndUpgrade, _authorizeUpgrade)
manual review
Implement the missing constructor with initialization protection:
This one-line change effectively prevents the implementation contract from being initialized directly.
Atomic Deployment: Where possible, use deployment factories that initialize in the same transaction
The system can be re-initialized by an attacker and its integrity tampered with due to lack of `disableInitializer()`
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.