Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

The implementation of `MondrianWallet2::_authorizeUpgrade` lacks an appropriate access control mechanism.

Description

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.

Impact

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.

Tools Used

Manual review, vscode

Recommended Mitigation

Consider making the following change to the _authorizeUpgrade function and use an access control modifier such as OwnableUpgradeable.onlyOwner.

- function _authorizeUpgrade(address newImplementation) internal override {}
+ function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}
Updates

Lead Judging Commences

bube Lead Judge 12 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Lack of access control in _authorizeUpgrade

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.