NFTBridge
60,000 USDC
View results
Submission Details
Severity: high
Invalid

Usage of an incorrect version of Ownbale library can potentially malfunction all onlyOwner functions

Summary

The contract uses a non-upgradeable version of the Ownable library, which sets the deployer as the default owner via a constructor. Since upgradeable proxy contracts cannot use constructors, deploying this contract will leave the owner undefined, rendering all onlyOwner functions inaccessible.

Vulnerability Details

https://github.com/Cyfrin/2024-07-ark-project/blob/273b7b94986d3914d5ee737c99a59ec8728b1517/apps/blockchain/ethereum/src/UUPSProxied.sol#L14

contract UUPSOwnableProxied is Ownable, UUPSUpgradeable {

In UUPSOwnableProxied.sol, the contract is designed to be deployed as an upgradeable proxy contract although it uses @openzeppelin/contracts/access/Ownable.sol
instead of the upgradeable version, @openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol,
which is incompatible with the proxy pattern due to its reliance on constructors.

Impact

All onlyOwner functions will be permanently inaccessible after deployment, leading to a potential malfunction of critical administrative features.

Tools Used

Manual review

Recommendations

Switch to @openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol

Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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