Description:
A best practice in order to prevent from different vectors of attack is to follow the Check-Effects-Interactions (CEI) pattern. This is marked as low due to a low possibility attack as it needs high level of coordination.
Impact:
A possible vector attack may arise, if we interacted with a malicious contract and the deadline period has
passed, then the ERC-20 contract or receiving contract can call our InheritanceManager::inherit
function flipping the InheritanceManager::isInherited
flag to true, allowing beneficiaries to take the assets from the contract.
Proof of Concept:
Steps for sendERC20
:
Create malicious ERC-20 contract. On transfer
also check if the deadline has passed and call
InheritanceManager::inherit
function.
Owner uses InheritanceManager::sendERC20
and the malicious ERC-20 flips the flag InheritanceManager::isInherited
.
Recommended Mitigation:
Follow CEI pattern:
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.