The protocol contains a issue within the UpgradeBranch::upgrade function where there is no validation ensuring that the lengths of the initializables and initializePayloads arrays match. This oversight could lead to an improperly configured protocol if the length of initializables is less than that of initializePayloads.
RootUpgrade::initializeRootUpgrade function is internal function that provides the logic for initialization.
If initializables.length < initializePayloads.length transaction doesn't revert. This implies that the initialization process will continue despite lacking sufficient data for complete initialization of all branches. Consequently, some implementations intended to be initialized will remain uninitialized. This could result in an incorrect configuration of the protocol, as expected functions or parameters may not be properly set up. Such circumstances can introduce vulnerabilities in the protocol, as incomplete initialization might disrupt contract logic or allow malicious actors to exploit code gaps to achieve undesirable outcomes.
The primary impact of this vulnerability is the potential for an incorrectly configured protocol, which could compromise its security and functionality. Given that the transaction does not revert due to the absence of a check for matching array lengths, such misconfiguration may be difficult to detect.
Manual Review
Add the require in the UpgradeBranch::upgrade function to check that lengths of the initializables and initializePayloads arrays are equal.
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.