The inherit()
function in InheritanceManager
contract is missing access control, allowing anyone to call it and claim ownership of the contract, not just beneficiaries.
In InheritanceManager
contract, the inherit()
function checks if the deadline has passed and if there are registered beneficiaries, but doesn't verify that msg.sender
is actually a legitimate beneficiary. Once the inactivity period has elapsed, any external actor can call this function and claim ownership (if there is only one beneficiary) or alter the inheritance state (if there are more than one beneficiary).
The vulnerability described above has severe consequences:
Unauthorized Ownership Transfer (very likely): If there's only one beneficiary registered, an attacker can call the function after the deadline and become the owner of the contract, gaining complete control over all assets.
Unintended Inheritance Triggering (very likely): If there are multiple beneficiaries registered, an attacker can change the inheritance state isInherited = true
, allowing premature funds withdrawal.
Manual code review
Add access control, to verify that the caller is one of the registered beneficiaries.
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.