The system allows upgrades to occur before the session end time, which breaks a critical security invariant in the contract design.
The graduateAndUpgrade() function in the contract lacks a time-based check, allowing the system to upgrade to level two at any time during an active school session. This bypasses the intended restriction that upgrades should only happen after a session has ended.
This vulnerability allows the principal to prematurely trigger graduation and upgrade processes, potentially resulting in:
Unintended early distribution of funds to teachers and principal
Disruption of ongoing educational processes
Violation of user expectations regarding session timing
Potential exploitation of timing-dependent logic in connected systems
Manual review
Implement a time-based control in the graduateAndUpgrade() function to ensure upgrades can only occur after the session has formally ended:
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
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.