Hawk High

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

Missing Student Filtering During Upgrade

Summary

The LevelTwo contract fails to implement the filtering of students who didn't meet the cutoff score during the upgrade process, which violates a core invariant that states "Any student who doesn't meet the cutOffScore should not be upgraded."

Vulnerability Details

The empty graduate() function in LevelTwo does not contain any logic to filter students based on their scores:

*function* graduate() public reinitializer(*2*) {}

Additionally, the graduateAndUpgrade() function in LevelOne also lacks this filtering logic. This results in all student records being carried over to LevelTwo regardless of their academic performance.

Impact

This vulnerability severely affects the academic integrity of the system:

Students have no incentive to maintain good scores if everyone graduates regardless of performance.
The cutoff score mechanism becomes meaningless as it's not enforced
The school cannot maintain academic standards
The fundamental business logic of the system is compromised

Tools Used

manual review

Recommendations

Add student filtering logic to the graduate() function in LevelTwo.

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.

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.