The lack of input validation in TokenManager.sol#L43-L45 could allow the wrappedNativeToken
to be re-initialized with a contract containing arbitrary code.
The purpose of the initialize function in the context of upgradeable contracts is to serve as a constructor, which should only be called once to set up the initial state of the contract. However, the current implementation allows the initialize function to be called multiple times by the owner, potentially reinitializing the wrappedNativeToken
to a contract with arbitrary code.
If the owner's private key is compromised, an attacker could deploy a malicious token contract that is compatible on an interface level with WETH9 but contains harmful code. This malicious contract could execute arbitrary and potentially harmful logic when functions, such as, WETH::deposit()
and WETH::withdraw()
are called.
Manual Review, Foundry
Consider checking if the wrappedNativeToken
is already initialized.
Invalid, can only be initialized by admin, which are trusted per contest READ.ME. So this would take a malicious admin to reinitialize 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.