The withdrawInheritedFunds()
function in the InheritanceManager contract lacks the onlyBeneficiaryWithIsInherited()
modifier, which is essential for restricting access to authorized beneficiaries only.
The withdrawInheritedFunds()
function in the InheritanceManager contract lacks the onlyBeneficiaryWithIsInherited()
modifier, which is essential for restricting access to authorized beneficiaries only. This omission creates a significant security vulnerability that could allow unauthorized users to withdraw funds from the contract.
PoC:
The absence of proper access control allows any external address to call this function once the contract has been inherited (isInherited = true
), so this couse:
Unauthorized Fund Withdrawal: Any address can trigger the distribution of funds, not just the legitimate beneficiaries.
Premature Distribution: A malicious actor could trigger distribution before beneficiaries are ready or have coordinated their actions
Potential Fund Loss: Since the function distributes to all beneficiaries in the array (including address(0) entries), premature triggering could result in suboptimal distribution or permanent loss of funds.
Disruption of Inheritance Process: The inheritance process is designed to be controlled by beneficiaries, but this vulnerability undermines that control.
Foundry
Add the onlyBeneficiaryWithIsInherited()
modifier to the function withdrawInheritedFund()
. Consider implementing a pull pattern where each beneficiary claims their share individually.
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.