Sanctioned user can modify state of the market #92
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-70
grade-a
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
🤖_04_group
AI based duplicate group recommendation
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/market/WildcatMarket.sol#L202
Vulnerability details
Impact
A sanctioned user may call
repay()
which will modify the market state. This violates the invariant specified by the team:Accounts which are flagged as sanctioned on Chainalysis should never be able to successfully modify the state of the market unless the borrower specifically overrides their sanctioned status in the sentinel (other than token approvals, or through their tokens being withdrawn & escrowed in nukeFromOrbit and executeWithdrawal).
Proof of Concept
Add the following test to
WildcatMarket.t.sol
:Tools Used
Manual review
Recommended Mitigation Steps
Include a check to prevent sanctioned users from calling
repay()
.Assessed type
Invalid Validation
The text was updated successfully, but these errors were encountered: