If there is only one beneficiary any user who calls the inerit function of InheritanceManager first will become the owner of the contract.
The inherit function only cheks that the deadline is passed. If it is passed, and there is only one beneficiery it automatically makes msg.sender the owner.
The following test demonstrates the vulnerability:
If there is only one beneficiary anyone (who is fast enough to call the transaction after deadline) can steal all the funds from the contract.
Manual codereview, foundry test.
If it is expected that anyone can call inherit. then make sure that if there is only one beneficiary, not msg.sender becomes the owner, instead the only beneficiary becomes the owner.
Otherwise make sure, that only beneficiaries can call inherit().
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.