The function setRouter
update a router by a new router however, the validity of the new router isn't checked during the update.
This can introduce a risk in which the new router may be uncapable of carrying out the swap operation.
Observing the function below
As seen, the function doesn't check the validity of the input parameter before setting approval
The function does not check whether the provided _router
is a valid contract or a router capable of performing the desired swap. A malicious or incorrect address could be set as the router, potentially leading to undesirable outcomes.
Setting an undesired address as the router pose serious risk
Manual
Perform check to ensure that the new Router being updated to is valid
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.