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

perivously approved routers still retain approval to spend even after change

Summary

In strategyArband strategyOp the router addresses can be changed in cases of misconfigurations or compromises.

However the approval given to such routers are not revoked.

Vulnerability Details

https://github.com/Cyfrin/2024-12-alchemix/blob/82798f4891e41959eef866bd1d4cb44fc1e26439/src/StrategyArb.sol#L42

https://github.com/Cyfrin/2024-12-alchemix/blob/82798f4891e41959eef866bd1d4cb44fc1e26439/src/StrategyOp.sol#L48

if the router address gets changed to a new router the previous router approval still holds and can spend tokens from the vault.

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

Impact

in cases of router changes the previous router can still spend the assets the strategies

Tools Used

manual review

Recommendations

revoke the previous router approval by setting it to zero

Updates

Appeal created

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

Old router approval is not revoked after an update

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