The function _extractParametersFromProof()
in ScrvusdVerifierV1.sol
assumes that the length of proofs
is exactly PROOF_CNT
but does not validate the contents of the proofs. If the proofs contain invalid or manipulated data, the function may extract and use incorrect parameter values, leading to potential incorrect price updates.
Assumption Without Verification: The function assumes that all proofs
contain valid data without verifying their correctness beyond length checking.
Potential Manipulation: Attackers could craft malformed proofs that pass length validation but contain incorrect slot values.
Price Manipulation Risk: The function feeds the extracted values into _updatePrice()
, meaning incorrect parameters could alter the price oracle’s reported values.
This vulnerability allows an attacker to provide a malformed proof that:
Introduces incorrect parameter values.
Causes the oracle to update prices with manipulated data.
Potentially disrupts financial calculations dependent on accurate oracle prices.
Manual Code Review
Validate Proof Contents: Ensure each proof contains valid, expected data before using it.
Implement Additional Verification: Compare extracted values against expected ranges or historical trends.
Require Additional Signatures or Multi-Source Verification: Use multiple oracles to cross-verify prices before updating.
- See [here]([https://github.com/CodeHawks-Contests/2025-03-curve?tab=readme-ov-file#blockhash-oracle)](https://github.com/CodeHawks-Contests/2025-03-curve?tab=readme-ov-file#blockhash-oracle) on how it is used to verify storage variable - All state roots and proofs must be verified by the OOS `StateProofVerifier` inherited as `Verifier` (where the price values and params are extracted), so there is no proof that manipulating timestamp/inputs can affect a price update - It is assumed that the OOS prover will provide accurate data and the OOS verifier will verify the prices/max unlock time to be within an appropriate bound/values - There is a account existance check in L96 of `ScrvusdVerifierV1.sol`, in which the params for price updates are extracted from
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.