DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: low
Valid

Approval is not revoked when new router is set

Summary

There are setRouterin StrategyArb and StrategyOp, which allows admins to update router address, however, approval for previous router is not revoked.

Vulnerability Details

Upon update, new router will be granted with max approval:

function setRouter(address _router) external onlyManagement {
router = _router;
underlying.safeApprove(router, type(uint256).max);
}

But we can notice, the approval of previous router is not revoked, this mean previous router still has max allowance on the strategy, while the routers themselves will not pose any threats to the protocol, it's still not a good practice to do so.

Impact

Router approval presists, in extreme edge case, if router is set to a malicious one, then such router can drain the strategy.

Tools Used

Manual review

Recommendations

When setting new router, also revoke previous approvals.

Updates

Appeal created

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Old router approval is not revoked after an update

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Old router approval is not revoked after an update

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.