The graduateAndUpgrade function in LevelOne.sol does not verify whether students meet the cutOffScore before upgrading the system, allowing unqualified students to be upgraded to LevelTwo, violating the project's invariant.
According to the project invariants, any student who does not meet the cutOffScore should not be upgraded to the next level when the system transitions to LevelTwo. However, the graduateAndUpgrade function lacks any logic to check studentScore[_student] >= cutOffScore for students in listOfStudents. This allows all students, including those with scores below cutOffScore, to potentially be included in the upgrade process.
Relevant code in graduateAndUpgrade:
No condition verifies studentScore against cutOffScore, violating the invariant.
Impact: High
This vulnerability severely disrupts the protocol's core functionality by allowing unqualified students (those with scores below cutOffScore) to be upgraded to LevelTwo. This undermines the project's merit-based graduation system, leading to unfair outcomes and compromising the protocol's integrity. No direct financial loss occurs, but the system's logic is significantly violated.
Likelihood: Medium
Exploitation depends on the principal calling graduateAndUpgrade when some students have scores below cutOffScore, which is feasible during normal operation if reviews result in low scores. The likelihood is moderate, as it requires specific conditions but is not guaranteed.
Manual code analysis
filter eligible students into a new list for LevelTwo to ensure only qualified students are upgraded, which requires additional logic in LevelTwo's initialization.
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
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.