Submitted by rouhsamad, also found by m4k2 and zaevlad
https://github.com/code-423n4/2024-12-lambowin/blob/main/src/rebalance/LamboRebalanceOnUniwap.sol#L76
https://github.com/code-423n4/2024-12-lambowin/blob/main/src/rebalance/LamboRebalanceOnUniwap.sol#L109-L114
LamboRebalanceOnUniwap::rebalance accepts a directionMask argument, an arbitrary uint256 mask. It ORs this mask with uniswapPool and passes it to the OKX Router to perform zeroForOne or oneForZero swaps (using the MSB).
However, this lets an attacker find a pool address with a malicious token. Attacker needs to find a pool with a malicious coin (discussed in PoC) so that given:  
 we will have: 
Which allows attacker to insert the malicious pool here by passing malicious_mask to rebalance function:
Later, the first condition is not met since the directionMask is not equal to (1 << 255). The code goes to the second condition:
Second condition:
_executeSell calls OKXRouter with newly minted VETH (which we received at a discount, if VETH is priced higher than WETH). It then sends VETH to the malicious pool and receives malicious tokens + flash-loaned amount + 1 wei as the profit. the fact that its possible to replace the uniswapPool with our desired malicious pool opens up an attack path which if carefully executed, gives attacker the opportunity to profit from WETH-VETH depeg, leaving Lambo.win no profits at all.
The only difficult part of this attack is that attacker needs to deploy the malicious coin (which is paired with VETH) at a specific address so that their v3 pair address satisfies this condition:
Basically the malicious_pool_address must have at least the same bits as the uniswapPool so that we can use a malicious mask on it. 
Finding an address to satisfy this is hard (but not impossible, given current hardware advancements). For the sake of this PoC to be runnable, I have assumed the address of uniswapPool is 0x0000000000000000000000000000000000000093, so that we can find a malicious pool address and token easily. The actual difficulty of this attack depends on the actual address of WETH-VETH pool; however, I have used a simpler address, just to show that the attack is possible, given enough time.
After attacker deployed the right contracts, he can use them to profit from WETH-VETH depeges forever (unless new rebalancer is created).
If price(VETH) / price(WETH) > 1, this attack is profitable. It costs only transaction gas and leaves nothing for the Lambo.win team.
To execute the PoC, first create the necessary files:
https://gist.github.com/CDDose/cf9d31046af661d077c442e437b9a06b
Some interfaces are changed (added new functions) like INonfungiblePositionManager, you can fix errors after creating the files.
Also, most importantly, make sure to change LamboRebalanceOnUniwap::uniswapPool to 0x0000000000000000000000000000000000000093 for the sake of testing:
PoC scenario:
Make sure that directionMask is either (1 << 255) or 0.
Shaneson (Lambo.win) confirmed and commented:
