The inherit()
function lacks the onlyBeneficiaryWithIsInherited
modifier, allowing any address to call it. When there is only one beneficiary, this can result in unauthorized ownership transfer to any caller, completely bypassing the intended inheritance mechanism.
The current implementation:
The issue is that when beneficiaries.length == 1
, the function:
Transfers ownership to msg.sender
without verifying if they are the legitimate beneficiary
Resets the deadline, giving the attacker full control
Allows complete bypass of the inheritance mechanism
Other functions that handle inheritance properly use the onlyBeneficiaryWithIsInherited
modifier:
HIGH
Direct risk to all funds in the contract
Complete compromise of contract ownership
Bypass of core inheritance mechanism
Attacker gains full control of:
All ETH in the contract via sendETH
All tokens via sendERC20
Arbitrary contract interactions via contractInteractions
Likelihood: High
Alice sets up an inheritance wallet with Bob as the only beneficiary
Alice deposits 100 ETH and various tokens into the contract
The 90-day deadline passes without activity
Malicious actor Eve, who is not the beneficiary, calls inherit()
Since beneficiaries.length == 1
, Eve becomes the new owner instead of Bob
Eve now has full control of the contract and can:
Bob, the legitimate beneficiary, permanently loses access to their inheritance
The attack:
Requires no special permissions
Only needs to wait for the deadline
Results in complete loss of funds
Cannot be reversed once executed
No special conditions required beyond single beneficiary setup
Can be executed by any external address
Only requires waiting for deadline
No complex exploitation steps needed
Manual review
Code inspection
Foundry tests
Add the onlyBeneficiaryWithIsInherited
modifier to the inherit()
function:
This change would:
Ensure only legitimate beneficiaries can trigger inheritance
Protect against unauthorized ownership transfer
Maintain consistency with other inheritance-related functions
Preserve the intended security model of the contract
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.