Hawk High

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

Unprotected upgradeable contract

Summary

  • LevelOneis an upgradeable contract. Anyone can call initialize on the logic contract .


Vulnerability Details

  • Malicious or accidental upgrades can break code logic, & exploits the functions then steal the fund of the protocol (Hawk High).

Impact

Tools Used

Recommendations

  • Add a constructor to ensure initialize cannot be called on the logic contract.

```diff
modifier notYetInSession() {
if (inSession == true) {
revert HH__AlreadyInSession();
}
_;
}
+constructor() {
+_disableInitializers();
+}
////////////////////////////////
///// /////
///// INITIALIZER /////
///// /////
////////////////////////////////
```
Updates

Lead Judging Commences

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

contract can be re-initialized

The system can be re-initialized by an attacker and its integrity tampered with due to lack of `disableInitializer()`

Support

FAQs

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

Give us feedback!