Normal behavior: PuppyRaffle collects an entrance fee from every participant. After a winner is selected, the protocol takes a 20% cut stored in totalFees. The owner calls withdrawFees() to send accumulated fees to feeAddress. The owner can also update feeAddress at any time via changeFeeAddress().
The issue: There is no validation, timelock, or access restriction on what address feeAddress can be set to. A malicious or compromised owner can call changeFeeAddress() to set feeAddress to any arbitrary address — including an attacker-controlled contract — immediately before calling withdrawFees(). All accumulated protocol fees are then sent to the attacker with no recourse.
This is a centralization risk combined with a missing input validation vulnerability. The feeAddress should either be immutable (set once at deployment) or protected by a timelock and multisig mechanism before any change takes effect.
Likelihood:
The owner can call changeFeeAddress() at any time before calling withdrawFees() — no conditions required.
No timelock, multisig, or governance mechanism exists to delay or reject a malicious address change.
A compromised owner private key is sufficient to execute the full attack in two transactions.
Impact:
All accumulated protocol fees (totalFees) can be redirected to an attacker-controlled address in a single transaction.
Fees belonging to the protocol are permanently lost with no recovery mechanism.
Player trust in the protocol is destroyed — the raffle fee collection is completely insecure
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.