Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

Missing cutOffScore Check in graduateAndUpgrade

Summary

Missing cutOffScore check allows failing students to persist post-upgrade.

Vulnerability Details

The graduateAndUpgrade function in LevelOne.sol does not check studentScore against cutOffScore for each student, allowing students who fail to meet the cutOffScore to remain in the listOfStudents post-upgrade, violating the invariant that failing students should not be upgraded.

Impact

Incorrect student progression, potentially affecting future sessions.

Tools Used

Manual code review.

Recommendations

Add a loop in graduateAndUpgrade to check studentScore[student] >= cutOffScore and remove failing students from listOfStudents.ons

Updates

Lead Judging Commences

yeahchibyke Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

cut-off criteria not applied

All students are graduated when the graduation function is called as the cut-off criteria is not applied.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.