Unprotected call to a function sending Ether to an arbitrary address.
File: contracts/pipeline/junctions/UnwrapAndSendETH.sol
UnwrapAndSendETH.unwrapAndSendETH(address) (contracts/pipeline/junctions/UnwrapAndSendETH.sol#27-35) sends eth to arbitrary user
Dangerous calls:
- (success) = to.call{value: address(this).balance}(new bytes(0)) (contracts/pipeline/junctions/UnwrapAndSendETH.sol#31-33)
L#31-33,
27: function unwrapAndSendETH(address to) external {
28: uint256 wethBalance = IWETH(WETH).balanceOf(address(this));
29: require(wethBalance > 0, "Insufficient WETH");
30: IWETH(WETH).withdraw(wethBalance);
31: (bool success, ) = to.call{value: address(this).balance}(
32: new bytes(0)
33: );
34: require(success, "Eth transfer Failed.");
35: }
Sending funds to any address without check may result in loss of funds.
Ensure that an arbitrary user cannot withdraw unauthorized funds.