The constructor does not check if _oracles.length > 0
, allowing deployment with an empty array. This can lead to invalid contract states, runtime errors, or failures in functions that rely on oracles
.
Deploy the contract with an empty _oracles
array, then call any function accessing oracles
(e.g., oracles[0]
), resulting in an out-of-bounds error.
Affected Areas: Constructor and any function depending on the oracles
array.
Security Risks: Malicious actors could exploit the unvalidated state to disrupt contract behavior or cause denial of service.
Manual review
Add the below line to check for oracles length.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.