The changeHost function in the contract lacks a critical validation to prevent the host variable from being set to address(0). This oversight could lead to a denial of service (DoS) and irrecoverable contract state, as address(0) does not represent a valid host.
The function fails to validate that _newHost is a valid, non-zero address. This allows address(0) to be set as the host, effectively bricking the contract, as address(0) cannot execute any functions restricted by the onlyHost modifier.
If host is set to address(0), all functions protected by the onlyHost modifier become inaccessible, rendering the contract partially or completely unusable.
The contract could be permanently bricked if no mechanisms exist to recover from an invalid host.
Manual Review: A detailed inspection of the changeHost function revealed the absence of a check for address(0).
Add a check to ensure that _newHost is not the 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.