The LevelOne::graduateAndUpgrade function fails to properly validate student scores during the graduation process, allowing students with scores below the minimum cutoff to graduate and progress to the next level.
The contract's graduation mechanism is intended to filter out students who don't meet the minimum score requirement (set during session start). However, the implementation doesn't correctly check each student's score against this threshold. As demonstrated in the test, a student with multiple negative reviews and a score below the cutoff threshold remains in the student list after graduation, instead of being removed.
PoC
This vulnerability undermines the entire academic merit system implemented in the contract. Students who haven't met the minimum requirements can unfairly advance to the next level, defeating the purpose of having performance evaluations and score thresholds. This could lead to:
Unqualified students progressing through the system
Devaluation of the educational certification
Loss of trust in the fairness of the academic system
Potential financial implications if graduation unlocks monetary rewards or reduces fees
Manual Review, Foundry
The fix ensures graduateAndUpgrade in LevelOne.sol only graduates students with scores at or above cutOffScore. It loops through listOfStudents, removing students with scores below the threshold by swapping with the last element and popping it, preserving array integrity. The else increments i to avoid index issues, ensuring only qualified students remain.
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.