The function _extractParametersFromProof
extracts storage slot values from a provided state proof. However, it does not perform sufficient validation to ensure the extracted values are within expected bounds, making the system vulnerable to incorrect or manipulated data being stored and used in price updates.
The function _extractParametersFromProof
processes state proofs by iterating through a list of extracted storage slots.
There are no explicit validation checks to ensure that the extracted values are within expected ranges or follow expected data formats.
If an attacker submits a malformed or manipulated proof, the contract might extract and use incorrect values, leading to invalid price calculations.
The contract assumes that the provided proof is always correct if it passes basic structural checks, without verifying the plausibility of extracted parameters.
If an attacker submits an invalid or out-of-bounds value, the oracle could accept and store an incorrect price update.
Users relying on the price feed might execute trades or lending operations based on manipulated data, resulting in financial loss.
The incorrect price could propagate across multiple DeFi protocols, leading to systemic risks within the ecosystem.
manauly
Implement strict validation checks for extracted storage values to ensure they match expected data types and fall within predefined ranges.
Introduce sanity checks on extracted values before using them in price calculations.
Implement logging and monitoring to detect anomalies in state proof extraction and reject suspicious inputs.
- 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.