Location
Found in src/ChristmasDinner.sol [Line: 137]()
Issue
When the refund() function executes, it transfers Ether (_refundETH) and ERC20 tokens (_refundERC20) to msg.sender (the caller). However, there is no verification to ensure that the recipient address is valid or that it matches some intended whitelist or logic. In typical scenarios, msg.sender should be the rightful owner of the deposited funds, but if any contract logic were changed or a re-entrancy exploit introduced, the lack of address checks might allow unintended entities to receive funds.
Impact
Unintended recipients may receive funds if the contract logic or some external call is manipulated. In extreme cases, a malicious contract could initiate refunds on behalf of others or intercept calls.
Recommendation
Validate msg.sender: Consider adding additional checks to ensure that the caller is indeed the entity to be refunded or that _to is a valid address (e.g., not the zero address).
Optional: Introduce role-based or signature-based checks if further trust constraints are needed (e.g., requiring an off-chain signature to authorize refunds).
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.