Scope: contracts/src/TreasureHunt.sol
The constructor guards against a zero verifier address:
But updateVerifier() has no equivalent sanity check:
An owner who fat-fingers a zero address (or points the contract at an
EOA or a non-conforming contract) silently replaces the verifier. The
emitted VerifierUpdated event still reports success. After
unpause(), every subsequent claim() reverts (either during the
external call, or because the verifier returns false), bricking the
hunt until the owner corrects the value.
Likelihood: MEDIUM — requires an owner-mistake, not an external
exploit; but the contract documents the owner as trusted, so
accidental misuse is the realistic concern.
Impact: LOW — no ETH is lost (owner can reset to the correct
verifier and resume, or emergencyWithdraw to recover); the hunt is
temporarily DoS'd.
Mirror the constructor's check:
This finding was identified and written up with the assistance of an
autonomous AI auditor (Anthropic Claude).
The issue is that `updateVerifier()` allows the owner to replace the verifier with an arbitrary address, including `address(0)`, even though the constructor explicitly treats a zero verifier as invalid and reverts with `InvalidVerifier()` during initial deployment. In other words, the contract establishes at deployment time that a null verifier address is not an acceptable configuration, but then fails to preserve that same invariant when the verifier is later updated through the admin recovery path.
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.