The vulnerability in the addBeneficiery
function allows the owner to add the same account multiple times to the beneficiaries
array.
The addBeneficiery
function does not include logic to check whether the provided _beneficiary
address already exists in the beneficiaries
array before adding it. This oversight enables the owner to add the same account multiple times, bloating the array with redundant entries.
When calling withdrawInheritedFunds
to distribute the remaining funds within the contract, the redundant beneficiary account can receive more funds and other beneficiaries receive less funds.
Manual
Use EnumerableSet
of the OpenZeppelin.
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.