Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: high
Invalid

`onlyOwner` upgrage authorization

Summary

src/trading-account-nft/TradingAccountsNFT.sol

The _authorizeUpgrade function uses the onlyOwner modifier to authorize contract upgrades. This can be a security risk if the owner’s private key is compromised.

Vulnerability Details

The _authorizeUpgrade function restricts contract upgrades to the owner only, which poses a risk if the owner's key is compromised. An attacker with control over the owner address could upgrade the contract to a malicious implementation.

Impact

Malicious Contract Upgrades: If the owner’s key is compromised, the attacker could maliciously upgrade the contract, potentially introducing security flaws or malicious code that can affect the contract’s users and data.

Tools Used

Manual code review

Recommendations

Implement a more secure upgrade authorization process, such as multisig or role-based access control. For example, you could use OpenZeppelin’s AccessControl to manage upgrade permissions with multiple parties.

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!