The InheritanceManager contract has a critical vulnerability in its inherit()
function where anyone can call it when the deadline passes. This allows unauthorized users to claim ownership if there's only one beneficiary, regardless of whether the caller is in the beneficiary list.
The inherit()
function lacks proper access control and allows anyone to trigger the inheritance process:
This implementation has a critical issue: it doesn't verify that msg.sender
is actually a beneficiary before transferring ownership. When there's only one beneficiary, it transfers ownership to whoever calls the function first, which could be anyone.
This vulnerability could lead to:
Unauthorized users claiming ownership of the contract
Complete theft of all assets controlled by the contract
Bypassing the intended inheritance process
Legitimate beneficiaries being unable to claim their inheritance
The severity is high because it allows complete takeover of the contract and all its assets by unauthorized users, fundamentally breaking the core purpose of the contract.
Manual code review
Implement proper access control in the inherit()
function:
Alternatively, consider using a mapping to track beneficiaries for more efficient access control.
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.