When the following deployVaults function is called, the createVault function below is also called. In the createVault function, bytes32 salt = keccak256(abi.encodePacked(operator, depositToken, self.vaultNonce++)) is executed, and such salt is used to call the cloneVault function below to deploy the vault. When an operators createVault transaction is in the mempool, operator, depositToken, and self.vaultNonce can be known, and a malicious actor can use these information to create the same salt and frontrun the operators createVault transaction by calling the LibClone.deployDeterministicERC1967BeaconProxy function with such salt and the Core contracts address. Since the malicious actors transaction deterministically deploys a contract to the address where the operators vault intends to be deployed to, the operators createVault transaction reverts after the frontrunning, which prevents vault.initialize(address(this), operator, depositToken, name, symbol, extraData) and self.operatorState[operator].addVault(vault) from being executed. Afterwards, the malicious actor can initialize his deployed contract to make himself the owner. If stakers believe that the malicious actors deployed contract is the operators vault due to that the deployed contracts address is the intended address of the operators vault, they can deposit into such contract. However, the malicious actor, as the owner of his deployed contract, can call his deployed contracts slashAssets function to transfer the stakers deposits out from such contract. As a result, the stakers lose their deposits.
Alternatively, a malicious operator can brute-force many values of  self.vaultNonce that are not yet used in the Core contract or depositToken and compute the potential vault addresses deterministically. Then, the operator can brute-force many values of salt to compute addresses of contracts, which can be controlled by him, based on CREATE2. When an address collision is found between the potential vault and the controlled contract after brute-forcing sufficient number of times, the operator can deploy the controlled contract to the collided address deterministically, call the controlled contract to allow the operator to spend all of such contracts depositToken balance, and call the controlled contracts selfdestruct function to destroy itself in which all of these operations of the operator are executed in one transaction. Afterwards, the operator deploys the vault using the self.vaultNonce corresponding to the collided address when such self.vaultNonce is reached in the Core contract if self.vaultNonce was brute-forced, which might require frontrunning if necessary, or the depositToken corresponding to the collided address if depositToken was brute-forced. After innocent stakers made enough deposits of the depositToken into the vault, the malicious operator can spend the vaults depositToken balance to transfer them to himself. Thus, the stakers also lose their deposits.
https://github.com/code-423n4/2024-07-karak/blob/d19a4de35bcaf31ccec8bccd36e2d26594d05aad/src/entities/CoreLib.sol#L118-L147
https://github.com/code-423n4/2024-07-karak/blob/d19a4de35bcaf31ccec8bccd36e2d26594d05aad/src/entities/CoreLib.sol#L89-L116
https://github.com/code-423n4/2024-07-karak/blob/d19a4de35bcaf31ccec8bccd36e2d26594d05aad/src/entities/CoreLib.sol#L149-L151
https://github.com/code-423n4/2024-07-karak/blob/53eb78ebda718d752023db4faff4ab1567327db4/src/Vault.sol#L193-L205
https://github.com/code-423n4/2024-07-karak/blob/53eb78ebda718d752023db4faff4ab1567327db4/src/Vault.sol#L322-L325
The createVault function can be updated to further encode block.timestampandblock.number in addition to operator, depositToken, and self.vaultNonce for computing the salt for deploying a vault.
