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.
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.
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.
Manual code review
Introduce an explicit check (e.g., a modifier) to verify that msg.sender is among the designated beneficiaries before allowing execution of withdrawInheritedFunds.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.