Array-out-of-bounds vulnerability in runNextAction function
A malicious actor can cause the runNextAction
function to fail by creating an array-out-of-bounds error.
The runNextAction
function assumes that metadata[1]
exists during index token swaps.
However, if the metadata array only has one element (length 1), accessing metadata[1]
will cause an error.
When the keeper calls runNextAction
with metadata of length 1, any malicious user can front-run this transaction by sending a small amount of index tokens to the vault.
This forces the keeper's transaction to hit the array-out-of-bounds error, causing it to revert.
The malicious actor can disrupt the keeper's ability to perform actions on the vault.
Manual Review
Add a check to ensure metadata.length
is valid before accessing specific elements.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood 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.