The vault doesn't verify that a deadline hasn't passed when a commitment is validated. Users are able to take out loans using strategies that have already expired. Depending on the nature of the strategy that can cause a loss of funds for the LPs.
Proof of Concept
When you take out a loan using the AstariaRouter, the deadline is verified:
If you search for deadline in the codebase you'll see that there's no other place where the property is accessed.
As long as the user takes out the loan from the vault directly, they can use strategies that have expired. The vault owner could prevent this from happening by incrementing the strategistNonce after the strategy expired.
Tools Used
none
Recommended Mitigation Steps
In VaultImplementation._validateCommitment() check that deadline > block.timestamp.
Lines of code
https://github.com/code-423n4/2023-01-astaria/blob/main/src/VaultImplementation.sol#L229-L266 https://github.com/code-423n4/2023-01-astaria/blob/main/src/AstariaRouter.sol#L439
Vulnerability details
Impact
The vault doesn't verify that a deadline hasn't passed when a commitment is validated. Users are able to take out loans using strategies that have already expired. Depending on the nature of the strategy that can cause a loss of funds for the LPs.
Proof of Concept
When you take out a loan using the AstariaRouter, the deadline is verified:
But,
VaultImplementation._validateCommitment()
skips that check:If you search for
deadline
in the codebase you'll see that there's no other place where the property is accessed.As long as the user takes out the loan from the vault directly, they can use strategies that have expired. The vault owner could prevent this from happening by incrementing the
strategistNonce
after the strategy expired.Tools Used
none
Recommended Mitigation Steps
In
VaultImplementation._validateCommitment()
check thatdeadline > block.timestamp
.