Summary
By whitelisting their address and sending a WINNER_DRAWN CCIP message to PrizeManager, Admin can steal the raffle prize, which breaks the invariant from README:
Winnables admins cannot do anything to prevent a winner from withdrawing their prize
Root Cause
In WinnablesPrizeManager, Admin can add/remove any address as CCIP counterpart at any time.
Internal pre-conditions
A raffle is able to reach REQUESTED stage (enough tickets were sold).
Attack Path
- Admin sends NFT (or token/ETH) to PrizeManager.
- Admin calls PrizeManager#lockNFT.
- Admin calls TicketManager#createRaffle.
- Raffle (ticket sale) ends successfully.
- drawWinner is called.
- Admin adds himself as PrizeManager's CCIP counterpart and sends WINNER_DRAWN CCIP message with his own address as
winnerto PrizeManager; Admin removes TicketManager from PrizeManager's CCIP counterparts. - Chainlink VRF request from step 5 is fulfilled.
- TicketManager#propagate is called, which propagates Alice as the winner of the raffle, but CCIP message reverts on the destination chain with
UnauthorizedCCIPSender(). - Admin claims reward from PrizeManager.
Impact
Admin steals the raffle reward.
Mitigation
Admin should not be able to add or remove CCIP counterparts during Raffles.