A critical vulnerability has been identified in the StrategyArb contract's setRouter function, which allows old routers to retain infinite approval over the strategy's WETH tokens, even after being replaced.
Disclaimer: This vulnerability requires the attacker to have previously had the role of router approved by MANAGEMENT. Although this limits the attack vector, the impact remains critical, as a compromised former router can steal all funds.
In StrategyArb.sol, the setRouter function gives infinite approval to the new router without revoking that of the old one:
PoC demonstrating operation:
Severity: High
An old malicious or compromised router may continue to move the strategy's WETH funds even after being replaced.
Potential loss of all strategy WETH funds
Direct and significant financial impact
Revoke approval of the old router before approving a new one:
Use a more secure approval pattern:
Avoid infinite approvals
Approve only the amount needed for each transaction
Use increaseAllowance/decreaseAllowance rather than approve when possible
Add additional controls:
Check that the new router is different from the old one
Implement a whitelist of authorized routers
Add delays between router changes
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.