Summary:
The InheritanceManager::removeBeneficiary function does not fully delete a beneficiary; it only replaces the entry with a zero address, which can still be interpreted as a valid beneficiary.
Vulnerability Details:
Using the delete keyword only resets the value to the zero address rather than removing the element from the array.
Impact:
High – Leaving a zero address in the array could affect inheritance distributions and contract logic.
Tools Used:
slither, aderyn, foundry
Recommendations:
Replace the beneficiary to be removed with the last element in the array and then call .pop() to delete the last entry.
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.