Closed sherlock-admin4 closed 6 months ago
Escalation
dup of https://github.com/sherlock-audit/2024-04-titles-judging/issues/445
Responded in #272 and #445.
Borderline low/medium. Tending towards low because in earlier contest issues like this were considered low.
Yu3H0
high
wrong usage of UUPSUpgradeable leads to non-upgradeable
Summary
wrong usage of UUPSUpgradeable
Vulnerability Detail
TitlesGraph is an UUPSUpgradeable contract, and the admin said it will be an upgradeable contract. However, when using TitlesGraph, it directly use new rather than proxy, which will leads to non-upgradeable.
The upgrade function
upgradeToAndCall
can only be called by proxy. https://github.com/Vectorized/solady/blob/main/src/utils/UUPSUpgradeable.sol#L81https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/graph/TitlesGraph.sol#L17
Impact
non-upgradeable contract
Code Snippet
https://github.com/Vectorized/solady/blob/main/src/utils/UUPSUpgradeable.sol#L81
https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/graph/TitlesGraph.sol#L17
Tool used
Manual Review
Recommendation
use uups correctly
Duplicate of #445