# A user can use the same proof for a commitment more than 1 time

A signed loan commitment can be reused to take multiple loans because the signature omits the vault address and stack, allowing replay with modified strategy.vault and stack.

- Payout: Contest reward
- Severity: medium
- Program: Astaria
- Credited: m9800
- Disclosed: 2023-05-22
- Write-up quality: 7/10
- Original: https://github.com/code-423n4/2023-01-astaria-findings/issues/589
- Library page: https://bugbountylibrary.com/r/c4%3A2023-01-astaria%3AM-01
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium technique:source-review vuln:business-logic vuln:signature-replay

**Target:** AstariaRouter and VaultImplementation smart contracts
**Root cause:** The commitment signature validation via ecrecover does not include the vault address or the lien stack in the signed data, so a valid signature can be reused with a different vault and stack.
**Steps:**
1. User takes a loan via AstariaRouter.commitToLiens() with a valid commitment signature.
2. User manually transfers the NFT to CollateralToken and obtains the collateral token.
3. User calls VaultImplementation.commitToLien() directly with the same commitment but changes strategy.vault to a different vault and updates the stack to include the previous lien.
4. The signature check passes because _encodeStrategyData() does not include strategy.vault or the stack.
5. The strategy validator (e.g., UNI_V3Validator) also passes because it only checks nlrDetails and merkle proof, which are unchanged.
6. A new lien is created and payout is issued, effectively taking a second loan with the same signature.
**How found:** The auditor noticed that _encodeStrategyData() omits strategy.vault and version, and that the stack is not part of the signed data, allowing replay with modifications.
**Exploitation:** An attacker who has a valid commitment signature can replay it against a different vault and with an updated stack to obtain additional loans, potentially draining vault funds or over-leveraging the collateral.
**Insight:** When auditing signature schemes, verify that all mutable parameters that affect the outcome are included in the signed digest; omitting even seemingly benign fields like vault address or stack can enable replay.
