The normal behavior is that admin fund-sweep operations are restricted to the owner.
The issue is that withdraw() has no ownership restriction. Any external account can trigger the final sweep once claimsCount >= MAX_TREASURES, forcing owner-side fund movement timing.
Likelihood:
Any account can call withdraw() directly when the claim count condition is met.
Existing test confirms non-owner call succeeds.
Impact:
No direct fund theft occurs because withdrawn ETH is sent to owner.
Unauthorized actors can still force premature treasury movement and disrupt operational timing assumptions.
Severity rationale:
Classified as Low because the unauthorized caller cannot redirect funds, only trigger timing of a legitimate owner payout.
Standalone reproduction:
Reach claimsCount == MAX_TREASURES.
Ensure contract still holds ETH.
Call withdraw() from a non-owner address.
Observe call succeeds instead of reverting for unauthorized access.
Restrict the function withdraw()to only the owner
The `withdraw()` function is intended as an owner-only post-hunt recovery function, but the implementation does not actually enforce any ownership check before transferring the full remaining balance to owner. The function only requires that `claimsCount >= MAX_TREASURES` and that the contract balance is nonzero, after which it sends all ETH to the stored owner address regardless of who called the function. Therefore, the access control on the function itself is incomplete because any external account can trigger the withdrawal path once the hunt is considered over.
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.