Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

Missing Beneficiary Validation in `inherit()`

Summary

When beneficiaries.length == 1, any address can call inherit() to become the new owner, regardless of beneficiary status.

Vulnerability Details

The inherit() function allows msg.sender to claim ownership if there’s one beneficiary, without verifying if the caller is the actual beneficiary.

Impact

An attacker can take full control of the contract after 90 days of inactivity, stealing all assets.

Tools Used

Manual review.

Recommendations

Add a check: require(msg.sender == beneficiaries[0], "Not beneficiary").

Updates

Lead Judging Commences

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

Inherit depends on msg.sender so anyone can claim the contract

Support

FAQs

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