The inherit() function in InheritanceManager lacks proper validation of msg.sender, allowing any address to take ownership of the contract if there is exactly one beneficiary and the deadline has passed.
Critical issues:
Missing Validation
No check if msg.sender is a beneficiary
Anyone can call this function
Only time-based check is performed
Direct ownership transfer to caller
Attack Scenario
Wait for deadline to pass
Check if there's exactly one beneficiary
Call inherit() from any address
Instantly become owner
Comparison with Multi-Beneficiary Case
Multiple beneficiaries case properly sets isInherited
Single beneficiary case directly transfers ownership
Inconsistent security model
CRITICAL - The vulnerability enables:
Complete Contract Takeover
Unauthorized ownership transfer
Access to all assets
Control of all functions
Reset of deadline
Inheritance Hijacking
Block legitimate beneficiary
Steal all contract assets
Manipulate contract state
Permanent control
Add Proper Validation:
Consider Unified Inheritance Model:
Add Safety Features:
Timelock on ownership transfer
Multi-sig for single beneficiary
Emergency pause mechanism
Proper event emissions
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.