Submitted by haxatron, also found by peanuts (1, 2), SBSecurity, givn (1, 2), Emmanuel, and EV_om
For multiple bridge functions, it allows a user to specify a refundAccount parameter to receive the excess fees paid for cross-chain transaction.
Example shown below:
WormholeDepositProcessorL1.sol#L59-L98
When the refundAccount is address(0) we default to the msg.sender. The intended functionality of this, as quoted by sponsor:
However, for the L1DepositProcessor contracts, msg.sender will always be the Dispenser contract, so the refunds will be sent to the wrong address. This also affects the Arbitrum contracts.
The intended functionality is broken and refunds will be sent to the wrong address.
Set the refundAccount to tx.origin instead.
kupermind (Olas) confirmed
Olas mitigated
Varun_05 (warden) commented:
