The InheritanceManager::contractInteractions
function allows the contract owner to execute arbitrary external calls with any calldata and an optional ETH transfer. While the function is restricted to onlyOwner
, this design introduces significant risks if the owner's private key is compromised or if the owner mistakenly interacts with a malicious contract.
This function effectively grants the owner unrestricted execution power, making it equivalent to an externally owned account (EOA) in terms of contract interaction. If misused or compromised, it could lead to loss of funds, execution of unintended operations, or exposure to external contract vulnerabilities.
Owner Key Compromise Could Lead to Total Loss of Funds
Since contractInteractions
allows arbitrary calls, if an attacker gains access to the owner's private key, they could call external contracts (e.g., swap all assets to another address or withdraw all ETH and tokens).
This effectively grants full control over the contract’s assets to whoever controls the owner key.
No Whitelist or Safety Checks on _target
The function does not restrict which contracts can be called. The owner could unknowingly interact with:
Malicious smart contracts that drain assets.
Buggy or unverified contracts that cause unexpected state changes.
Blacklisted contracts that could have compliance implications.
Potential for Reentrancy and Unexpected Behavior
Although nonReentrant
is applied, if it is not correctly implemented, reentrancy may still be possible if a called contract has callbacks into this contract.
Even without reentrancy, calling unknown contracts introduces execution risk, such as failed transactions, state corruption, or infinite loops.
Potential Total Loss of Funds
If the owner's private key is compromised, all contract assets could be drained via arbitrary calls.
Unrestricted Execution Power Without Verification
The owner may mistakenly interact with malicious or high-risk contracts.
Risk of Contract Misbehavior
External contract calls could result in unintended state changes or vulnerabilities being introduced in the future.
Unnecessary Storage and Gas Costs
Tracking every call through _storeTarget
could increase contract storage overhead and operational costs.
Manual Review
_target
)Limit contractInteractions
to interact only with whitelisted contracts.
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.