Submitted by byterocket, also found by 242, _141345_, 0x1f8b, ACai, ayeslick, berndartmueller, BradMoon, cccz, Chom, giovannidisiena, infosec_us_team, Lambda, minhtrng, nine9, oyc_109, PwnedNoMore, reassor, scaraven, slywaters, sseefried, tofunmi, Twpony, and unforgiven
https://github.com/code-423n4/2022-07-fractional/blob/main/src/Vault.sol#L62
https://github.com/code-423n4/2022-07-fractional/blob/main/src/Vault.sol#L126
https://github.com/code-423n4/2022-07-fractional/blob/main/src/Vault.sol#L25
The Vault#execute function calls a target contracts function via delegatecall if the caller is either the owner of the Vault or the target contract is part of a merkle tree, indicating a permission to call the target contract.
(See Vault#execute)
If the checks succeed, the internal _execute() function is used to execute the call via delegatecall.
delegatecalls have to be used with caution because the contract being called is using the callers contract storage, i.e. the callee contract can alter the callers contract state (for more info, see Solidity docs).
The developers seem to be aware of the danger that the callee contract is able to overtake the Vaults ownership, by changing the Vaults owner variable, as the owner is cached before the delegatecall and afterwards checked that the variable did not change:
(See Vault#_execute)
However, changing the owner variable is not the only way the callee contract is able to overtake the Vaults ownership. If the nonce variable is re-set to 0, the Vaults init function becomes callable again, granting ownership to the caller:
(See Vault#init)
Note that other storage variables (i.e. merkleRoot and methods) could also be altered, but this would not lead to a loss in ownership, i.e. the project could re-set the variables.
Nevertheless, a contract trying, due to being malicious or faulty, to change the Vaults ownership first needs to be permissioned by the owner by adding it to the merkle tree. Otherwise, the contract can not be called.
Due to the fact that the owner variable check is included, meaning the project rates operational management already as being error-prone, and the high number of security issues in connection to faulty usage of delegatecall, the severity is rated as MEDIUM (HIGH impact with a LOW likelihood).
Add the following code to the test/Vault.t.sol file and run forge test --match-test "testExecuteNoRevertIfReinitialized" -vvvv.
If the test succeeds, the Vault got re-initialized due to a delegatecall altering the Vaults nonce variable.
Check the nonce variable before and after the delegatecall inside the _execute() function as well, e.g.:
mehtaculous (Fractional) confirmed 
HardlyDifficult (judge) commented:
