According to the documentation only students that have a score higher than the cut off score are to be upgraded.
Any student who doesn't meet the
cutOffScoreshould not be upgraded
The current implementation does not check if the students have a score higher than the cut off score before upgrading them.
The vulnerability is located in the graduateAndUpgrade function of the LevelOne contract.
The function does not check if the students have a score higher than the cut off score before upgrading them. This means that all students will be upgraded regardless of their score.
The following test should validate that the students are not upgraded if they do not have a score higher than the cut off score:
but this fails since the students are upgraded regardless of their score.
The current implementation allows students to be upgraded without meeting the required cut off score, which does not meet the documentation requirements.
Manually reviewed the code and the documentation.
The graduateAndUpgrade function should be changed to check if the students have a score higher than the cut off score before upgrading them. This can be done by adding a check for each student in the listOfStudents array and removing those that do not meet the cut off score from the array before upgrading the contract.
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
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.