When the owner calls the rescue() function, they do not check if the rescue address is a zero address. If it is a zero address, the program will not be revert() when executing payable (to). transfer (amount), but the owner will permanently lose this money.
The parameter address to has not been checked, and it also involves the parameter address token. When the parameter token has a zero address, it will be transferred to ETH, so there may be confusion here. It is necessary to explicitly limit the parameter to to not have a zero address.
It may cause the owner to permanently lose an ETH.
Manual code review.
Add an assertion require () to restrict to from being a zero address.
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.