Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: high
Likelihood: high
Invalid

Lack of Permanent Expulsion Tracking

Lack of Permanent Expulsion Tracking

Summary

Expelled students can re-enroll after being removed, which defeats the purpose of the expulsion mechanism.

Vulnerability Details

The contract only removes the student from the isStudent mapping in expel():

isStudent[_student] = false;

There is no tracking of previously expelled addresses, allowing expelled students to call enroll() again.

Impact

This allows malicious or previously removed users to rejoin the system without restriction, violating business rules.

Tools Used

Manual code review.

Recommendations

Introduce a permanent expulsion flag:

mapping(address => bool) public wasExpelled;

Update expel():

wasExpelled[_student] = true;

And enroll():

if (wasExpelled[msg.sender]) {
revert HH__NotAllowed();
}
Updates

Lead Judging Commences

yeahchibyke Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
yeahchibyke Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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