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

underlying tokens can be stolen from the strategy by malicious manager

Summary

the function setRouter(address _router) external is called by the manager to set the router address

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

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

The previously approved tokens are not automatically revoked if the router address is updated. This creates a risk where, if the old router contract is vulnerable or is controlled by a malicious actor, it could still access and transfer the underlying tokens due to the existing approval.

Vulnerability Details

changing routers does not revoke the tokens approved.

Impact

leaving the changed router with token approval creates the risk of underlying token theft.

Tools Used

Manual audit.

Recommendations

consider revoking the approved tokens when the router is changed

Updates

Appeal created

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