The withdrawInheritedFunds
function lacks the onlyBeneficiaryWithIsInherited
modifier that other inheritance-related functions have. This allows any address to trigger fund distribution once inheritance is active, not just the beneficiaries.
The current implementation:
Other inheritance-related functions properly use the modifier:
buyOutEstateNFT
: external onlyBeneficiaryWithIsInherited
appointTrustee
: external onlyBeneficiaryWithIsInherited
The issue:
Any external address can call withdrawInheritedFunds
once isInherited
is true
This bypasses the intended access control where only beneficiaries should trigger distribution
Could lead to premature or unwanted distribution of funds
LOW
Disrupts intended access control
Allows non-beneficiaries to trigger fund distribution
Doesn't directly risk funds (distribution still goes to correct beneficiaries)
Violates principle of beneficiary control over inheritance process
Likelihood: Medium
Can be triggered by any external address
Requires inheritance to be active
No complex exploitation steps
Owner sets up inheritance with multiple beneficiaries
Owner becomes inactive for 90+ days
A beneficiary calls inherit()
to activate inheritance
Before beneficiaries can coordinate their actions, a malicious third party calls withdrawInheritedFunds
Funds are distributed prematurely, potentially disrupting beneficiaries' plans
Beneficiaries lose control over the timing of distribution
Manual review
Code inspection
Foundry tests
Add the onlyBeneficiaryWithIsInherited
modifier to the function:
This change would:
Ensure only beneficiaries can trigger fund distribution
Maintain consistent access control across inheritance functions
Preserve beneficiaries' control over the inheritance process
Align with the contract's intended security model
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.