Location: contracts/src/TreasureHunt.sol:236-241 (fund) vs contracts/src/TreasureHunt.sol:287-289 (receive)
fund() is owner-only:
But receive() accepts ETH from anyone and emits the same Funded event:
A non-owner can send ETH directly to the contract address, deposit any amount, and trigger a Funded event bypassing the ONLY_OWNER_CAN_FUND restriction.
Likelihood: High. Very easy to transfer ETH directly.
Impact: Low. No one can steal but anyone can send ETH to the contract.
Run:
The test passes stranger's fund() call reverts, but their direct ETH transfer succeeds.
Either restrict receive() with the same owner check, or delete it entirely and force all deposits through fund().
Or:
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.
The contest is complete and the rewards are being distributed.