Both sendERC20 and sendETH functions in InheritanceManager.sol fail to validate the recipient address (_to), which can result in irreversible loss of funds.
Neither function checks whether _to is address(0). If _to == address(0), the transaction will succeed, but the funds will be permanently lost:
ERC20 tokens sent to address(0) are burned.
ETH sent to address(0) is unrecoverable.
If _to == address(this), the contract could accidentally send ETH to itself, leading to unintended behavior.
Affected Codes
** Irreversible loss of funds** for the contract and users.
Require _to to be a valid address before transferring funds:
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.