Description: The InheritanceManager
contract does not verify that msg.sender is a beneficiary before executing critical inheritance functions. This allows any external user to execute these functions, potentially manipulating the inheritance process and disrupting fund distribution.
The affected functions are:
inherit()
withdrawInheritedFunds()
buyOutEstateNFT()
Impact:
inherit()
→ This function has already been reported as vulnerable to an attack where an attacker can take control of the contract. However, in this case, the lack of beneficiary verification allows any user to activate inheritance without having any connection to the owner or legitimate beneficiaries. This breaks trust in the protocol, as inheritance can be triggered arbitrarily by unauthorized users.
withdrawInheritedFunds()
→ Any user can force the distribution of funds, even though the check for whether inheritance is active prevents immediate loss. However, in a contract that may handle large amounts of funds, allowing unauthorized users to trigger withdrawals compromises the protocol’s financial security.
buyOutEstateNFT()
→ Any user can call this function without being a beneficiary and without inheritance being active. While the NFT is burned after the transaction and has no value within the protocol, this allows unexpected actions in a contract of this scale, which could create distrust among users and facilitate system manipulation.
Proof of Concept: This test demonstrates a security flaw where any user, regardless of whether they are a beneficiary, can activate the inheritance phase by calling the inherit()
function.
Manual review
Foundry for testing
Recommended Mitigation: We recommend adding the modifier
InheritanceManager::onlyBeneficiaryWithIsInherited
to each affected function to ensure that only legitimate beneficiaries can execute them.
Additionally, in the withdrawInheritedFunds()
function, the existing isInherited
check should be removed, as this verification is already handled by the modifier, preventing redundant checks and optimizing gas usage.
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.