Description: The _verify_proof
function iterates through a dynamic array of proof elements without a limit on gas consumption, which could lead to out-of-gas errors for large proofs.
Lines 85-93:
Impact: While the DynArray is bounded to 20 elements (which mitigates the issue significantly), complex merkle trees could still require a significant amount of gas for verification. In extreme cases, this could lead to transaction failures due to reaching block gas limits.
Recommended Mitigation: The current implementation is already partially mitigated by limiting the array to 20 elements. Consider adding a check to ensure the proof length is reasonable:
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.