Submitted by kenzo, also found by 0x1f8b, bin2chen, codexploder, dipp, minhtrng, and smiling_heretic
https://github.com/code-423n4/2022-07-fractional/blob/main/src/modules/Migration.sol#L111
https://github.com/code-423n4/2022-07-fractional/blob/main/src/modules/Migration.sol#L124
https://github.com/code-423n4/2022-07-fractional/blob/main/src/modules/Migration.sol#L143
https://github.com/code-423n4/2022-07-fractional/blob/main/src/modules/Migration.sol#L157
https://github.com/code-423n4/2022-07-fractional/blob/main/src/modules/Migration.sol#L164
In Migration, when joining or leaving a migration proposal, Fractional does not check whether the user supplied proposalId and vault match the actual vault that the proposal belongs to.
This allows the user to trick the accounting.
Loss of funds for users.
Malicious users can withdraw tokens from proposals which have not been committed yet.
Lets say Vault As FERC1155 token is called TOKEN.
Alice has deposited 100 TOKEN in Migration to Vault A on proposal ID 1.
Now Malaclypse creates Vault B with token ERIS as FERC1155 and mints 100 tokens to himself.
He then calls Migrations join with amount as 100, Vault B as vault, proposal ID as 1.
The function will get ERIS as the token to deposit.
It will pull the ERIS from Mal.
And now for the problem - it will set the following variable:
Notice that this does not correspond to the vault number.
Now, Mal will call the leave function, this time with Vault A address and proposal ID 1.
The function will get the token to send from the vault as TOKEN.
It will get the amount to withdraw from userProposalFractions[_proposalId][msg.sender], which as we saw previously will be 100.
It will deduct this amount from migrationInfo[_vault][_proposalId], which wont revert as Alice deposited 100 to this vault and proposal.
And finally it will send 100 TOKENs to Mal - although he deposited ERIS.
Mal received Alices valuable tokens.
I think that one option would be to save for each proposal which vault it corresponds to.
Then you can verify that user supplies a matching vault-proposal pair, or he can even just supply proposal and the contract will get the vault from that.
Another solution would be to have userProposalFractions save the relevant vault also, not just a general proposal id.
stevennevins (Fractional) confirmed 
HardlyDifficult (judge) commented:
