The InheritanceManager::inherit function lacks proper access control. If the beneficiaries array contains only one address, a non-beneficiary can exploit this vulnerability to inherit the contract and assume ownership.
The following test case demonstrates how an attacker can exploit this vulnerability to become the owner
This flaw enables any unauthorized entity to take over the contract, posing a significant security risk and potential loss of assets.
Foundry test
Introduce an onlyBeneficiary modifier to restrict access to the InheritanceManager::inherit function, ensuring only valid beneficiaries can call it
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.