The vulnerability arises because PARAM_SLOTS
is hardcoded in the ScrvusdVerifierV1
contract, assuming a fixed storage layout for the SCRVUSD
contract. When SCRVUSD
is upgraded, the storage slots of its variables may shift due to changes in the contract's structure (e.g., addition, removal, or reordering of variables). As a result, PARAM_SLOTS
no longer points to the correct data, causing the ScrvusdVerifierV1
contract to read and process invalid information.
The PARAM_SLOTS
array in ScrvusdVerifierV1
is defined as follows
These slots are used to read data from the SCRVUSD
contract. The SCRVUSD
contract is upgradable. If the SCRVUSD
contract is upgraded, it may change the storage layout of its variables. However, the ScrvusdVerifierV1
contract continues to use the old PARAM_SLOTS
values, which no longer correspond to the correct variables. Depending on the use case, this could lead to:
Incorrect price updates.
Invalid parameter adjustments.
System failures or security vulnerabilities.
The impact is High, the likelihood is very Low, so the severity is Low.
Manual Review
Make PARAM_SLOTS
configurable by adding a function to update its values. This allows the slots to be adjusted after SCRVUSD
upgrades.
Invalid, - srCRVUSD is a minimal proxy, meaning it can never by upgraded, see [here](https://www.cyfrin.io/blog/upgradeable-proxy-smart-contract-pattern#:~:text=Minimal%20proxies%20are%20distinct%20from,provide%20upgrade%20or%20authorization%20functionality.) and [here](https://www.rareskills.io/post/eip-1167-minimal-proxy-standard-with-initialization-clone-pattern) for more info. - Even if srcrvUSD is migrated in the future via a new minimal proxy contract deployment (which is highly unlikely), the verifier contracts can be migrated along with it via revoking the access-control within the `ScrvusdOracleV2.vy` and then granting access to a new oracle. This is also not within the scope of this contest.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.