Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing Explicit Beneficiary Check in withdrawInheritedFunds Function

Summary

The withdrawInheritedFunds function in the InheritanceManager contract does not verify that the caller is an authorized beneficiary. This absence of an explicit beneficiary check allows any external party to invoke the function. However, since funds are distributed equally among all beneficiaries, an unauthorized caller cannot misappropriate funds directly.

Vulnerability Details

The withdrawInheritedFunds function lacks a modifier or internal check to ensure that only a beneficiary (or an otherwise authorized account) can call it. This means that an unauthorized party can trigger the function. Although the distribution logic is based solely on the beneficiaries array and any caller’s request will result in funds being split among the beneficiaries, the function call itself should be restricted to legitimate parties to prevent potential misuse. The vulnerability might be combined with other weaknesses to cause unintended behavior, for instance, by forcing repeated calls or creating a denial-of-service scenario.

Impact

Direct Impact: Unauthorized parties can call the function, but they cannot redirect funds to themselves—the funds are still split equally among the beneficiaries.

Indirect Impact: Repeated or malicious calls by unauthorized parties could potentially lead to a denial-of-service or disrupt the expected execution flow of the inheritance distribution process.

Tools Used

Manual code review

Recommendations

Introduce an explicit check (e.g., a modifier) to verify that msg.sender is among the designated beneficiaries before allowing execution of withdrawInheritedFunds.

Updates

Lead Judging Commences

0xtimefliez Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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