Contract owner in risk of losing ownership if function initialize
is not called right after deployment
If function MondrianWallet2::initialize
is not called right after deployment, the contract ownership can be claimed by an attacker which will enable attacker to also call function executeTransaction
that carrying the risk of draining orginal owner's fund or exploit original owner's reputation for executing or approve certain malicious transactions.
Proof of Concept:
In the file test/ModrianWallet2Test.t.sol
, comment out the initization codes in the setUp
function and add new test testInitializationAndOwnershipClaimedByAttacker
:
The test will pass indicating that attacker can indeed claim contract ownership by initializing the contract before original owner makes the functional call after deployment
Losing ownership of the wallet causing fund loss and impact on owner's reputation due to malicious transactions
Manual review
Implement strict access controls and authentication mechanisms to reduce chances where someone other than the deployer could attempt to initialize the contract.
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.