The _authorizeUpgrade
function, as the name suggests, is needed to check if the upgrade to the new version of a contract is authorized (since only the owner of the wallet can upgrade the wallet), thus preventing anyone from just upgrading the MondrianWallet2
contract. However, the implementation of MondrianWallet2::_authorizeUpgrade
lacks a corresponding access control mechanism.
The missing authorization mechanism in MondrianWallet2::_authorizeUpgrade
would allow not only the owner to successfully upgrade the wallet to a new implementation, but anyone. This breaks one of the core invariants of the protocol.
Manual review, vscode
Consider making the following change to the _authorizeUpgrade
function and use an access control modifier such as OwnableUpgradeable.onlyOwner
.
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.