lender that's mistakenly flagged can lose access to funds #125
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-b
primary issue
Highest quality submission among a set of duplicates
Q-01
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/WildcatMarketConfig.sol#L82
Vulnerability details
Impact
The lender can lose access to their funds throughout the withdrawal cycle and will also miss out on any interest accrual during that period.
Description
When lenders are mistakenly flagged by
Chainalysis
, the borrower can use the overrideSanction function to override the sanction status:https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/WildcatSanctionsSentinel.sol#L96C3-L99C4
However, an issue arises if a lender is mistakenly flagged by
Chainalysis
. A malicious actor can exploit this by calling the nukeFromOrbit function on the lender to transfer their assets to escrow before the borrower has a chance to calloverrideSanction
.This is possible because
nukeFromOrbit
is an external function and can be called by anyone as long as the lender is flagged as sanctioned:However, an issue arises if a lender is mistakenly flagged byChainalysis
. A malicious actor can exploit this by calling the nukeFromOrbit function on the lender to transfer their assets to escrow before the borrower has a chance to calloverrideSanction
.This is possible because
nukeFromOrbit
is an external function and can be called by anyone as long as the lender is flagged as sanctioned:https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/market/WildcatMarketConfig.sol#L82C1-L88C4
As a result, the lender would lose access to their funds
Tools Used
Manual review
Recommended Mitigation Steps
The issue can be mitigated by restricting the function so that only the borrower can call it. This can be done by applying the
onlyBorrower
modifier, ensuring that no unauthorized parties can call the functionAssessed type
Access Control
The text was updated successfully, but these errors were encountered: