stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: low
Invalid

Contract use infinite approval, this can be dangerous if the approved contract becomes compromised

Summary

Contract use infinite approval, this can be dangerous if the approved contract becomes compromised

Vulnerability Details

File : SDLPoolCCIPController.sol
linkToken.approve(_router, type(uint256).max);
sdlToken.approve(_router, type(uint256).max);
File : WrappedTokenBridge.sol
linkToken.approve(_router, type(uint256).max);
token.approve(_wrappedToken, type(uint256).max);
wrappedToken.approve(_router, type(uint256).max);
File : SDLPoolCCIPControllerPrimary.sol
IERC20(_tokens[i]).safeApprove(router, type(uint256).max);

Impact

If a contract that has been approved is hacked, the impact will be very large. All approved token can be stolen by malicious actor

Tools Used

Manual review

Recommended Mitigation

Consider approving according to the number of tokens to be transferred

Updates

Lead Judging Commences

0kage Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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