A critical vulnerability has been identified in the InheritanceManager contract's inherit function. The function lacks proper access control, allowing any address to take ownership of the contract after the deadline period, leading to complete control over the contract's assets and functionality.
The vulnerability exists in the inheritance mechanism:
Missing Access Control:
The inherit function lacks a modifier to restrict calls to beneficiaries only
Any external address can call the function after the deadline
Caller becomes the new owner of the contract
Severe Consequences After Ownership Takeover:
From the test comments, an attacker can:
Burn NFTs owned by the contract
Drain all ERC20 tokens via sendERC20
Steal all ETH via sendETH
Execute malicious contract interactions
Create unauthorized estate NFTs
Manipulate beneficiary list:
Add multiple attacker-controlled addresses as beneficiaries
Remove legitimate beneficiaries
Redirect funds to attacker addresses
The test demonstrates this by:
Setting up contract with legitimate beneficiary
Waiting for inheritance period (90 days)
Having an unauthorized address (badGuy) call inherit()
Showing badGuy successfully becomes owner
From the test:
Critical severity. The vulnerability allows:
Complete takeover of contract ownership
Theft of all contract assets (ETH, ERC20, NFTs)
Manipulation of beneficiary system
Destruction of NFT assets
Execution of unauthorized contract interactions
Manual code review
Foundry test framework
Custom test cases demonstrating ownership takeover
Access control analysis
Implement proper access control:
Implement secure ownership transfer:
Transfer ownership to first beneficiary by default
Add multi-signature requirements for critical actions
Implement timelock for ownership actions
Add additional security measures:
Event logging for ownership changes
Timelock for critical functions after ownership transfer
Emergency pause mechanism
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.