Submitted by Koolex, also found by bin2chen
https://github.com/code-423n4/2023-01-astaria/blob/main/src/VaultImplementation.sol#L287
When a borrower takes a loan, Strategy details are passed along with other required data, and through the overall commitToLien flow, all the data are validated except the StrategyDetailsParam.vault
A borrower then can pass different vaults address, and when creating a lien this  vault is considered. Later, the borrower makes a payment, it reads the asset from this vault. Thus, the borrower can take loans and repay with whatever token.
https://github.com/code-423n4/2023-01-astaria/blob/main/src/LienToken.sol#L849
Allow me to describe a scenario where the borrower can steal all the funds from all vaults that support his/her collateral:
This exploit can be done with other vaults draining all the funds.
To prove this, Ive coded the scenario below.
The test will pass. Ive added comments in the code explaining the steps.
Note:The attack isnt possible when using AstariaRouter
In VaultImplementations commitToLien function, add the following validation:
Run the PoC test above again, and testPayWithDifferentAsset should fail.
SantiagoGregory (Astaria) confirmed
