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

An attacker can maliciously upgrade to a new implementation... Leading to loss of wallet control.

Summary

The _authorizeUpgradefunction is vulnerable to manipulation by blackhat aggressors, and gives them control over the contract.

Vulnerability Details

This function is needed for proper UUPS implementation:

function _authorizeUpgrade(address newImplementation) internal override {}

However, it is callable by anyone. Therefore, an attacker can call this function to unlawfully create a new implementation.

Here is a PoC:

  • an attacker wants to take over the wallet

  • the attacker passes a new address to the _authorizeUpgradefunction

  • the contract is successfully upgraded to the new address

  • the attacker is in charge!

Impact

Possible hijack of the wallet control.

Tools Used

Manual review.

Recommendations

Make the function only callable by the admin.

Updates

Lead Judging Commences

bube Lead Judge about 1 year 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.