The withdrawInheritedFunds
function in the InheritanceManager
contract is missing the crucial onlyBeneficiaryWithIsInherited
modifier. This allows anyone to call withdrawInheritedFunds
after inheritance, regardless of whether they are a designated beneficiary, leading to potential unauthorized asset withdrawal.
Explanation:
The onlyBeneficiaryWithIsInherited
modifier verifies that the caller is a designated beneficiary and that the isInherited
flag is true
.
Without this modifier, any address can call withdrawInheritedFunds
once isInherited
is true
.
withdrawInheritedFunds
divides the contract's assets (ETH or ERC20) among the beneficiaries.
A malicious actor could exploit this by calling withdrawInheritedFunds
, potentially withdrawing assets before the intended beneficiaries.
Unauthorized Asset Withdrawal: Malicious actors can call withdrawInheritedFunds
when users are not ready to accept funds or if there is an unresolved issues between beneficiaries.
Manual Code Review
Implement onlyBeneficiaryWithIsInherited
Modifier:
Apply the onlyBeneficiaryWithIsInherited
modifier to the withdrawInheritedFunds
function. This will limit function execution to legitimate beneficiaries who have claimed the inheritance.
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.