Description: The **LevelOne::initialize()**fuction can be called by anyone because it doesn't have access control. Attackers can front-run this transaction to set malicious parameters when the contract is deployed.
The function is public and only protected by the initializer modifier (which only prevents re-initialization)
No ownership check (like onlyOwner) or deployer validation
Attackers can watch the mempool and call initialize() first with their own parameters:
Set themselves as LevelOne::principal
Control the LevelOne:: _usdcAddress
Set arbitrary LevleOne:: _schoolFees
**Impact: **Complete compromise of contract configuration
Possible loss of funds if malicious USDC address is set
Recommended Mitigation: Add access control (e.g., onlyOwner or Onlyprincipal)
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.