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

`MondrianWallet2::_authorizeUpgrade` is missing access contraol

Summary

The MondrianWallet2::_authorizeUpgrade function is missing access controls.

Vulnerability Details

Because there are no access controls on the _authorizeUpgrade function, anyone can call it and upgrade the contract.

// Needed for UUPS
@> function _authorizeUpgrade(address newImplementation) internal override {}

Impact

Without an onlyOwner modifier on the _authorizeUpgradefunction, anyone will be able to call it and upgrade the contract.

Tools Used

--Foundry

Recommendations

It is recommended to add an onlyOwner modifier to protect the function from being called by anyone.

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

Lead Judging Commences

bube Lead Judge 11 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.