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

Unlimited Router approval

Vulnerability Details

The setRouter function in the StrategyArb contract approves an unlimited allowance for the new router without revoking the previous router's allowance. This can lead to potential security risks if the previous router is compromised or maliciously used.

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

Impact

  1. The previous router can still spend all the tokens when a new router has been setup, which can be exploited if the router is compromised.

  2. If an old router is compromised, it can drained all the tokens.

Tools Used

manual review

Recommendations

  1. implement a removal of the old router approval before granting approval to the new router

Updates

Appeal created

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

Old router approval is not revoked after an update

inallhonesty Lead Judge 5 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.