Solend Insecure Authentication Check
Notice: This page is a freshly imported case study from the original repository. The original content was in a different format, and may not have relevant information for all sections. Please help restructure the content by moving information from the 'About' section to other sections, and add any missing information or sources you can find. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.
Notice: This page contains sources which are not attributed to any text. The unattributed sources follow the initial description. Please assist by visiting each source, reviewing the content, and placing that reference next to any text it can be used to support. Feel free to add any information that you come across which isn't present already. Sources which don't contain any relevant information can be removed. Broken links can be replaced with versions from the Internet Archive. See General Tutorial on Wikis, Anatomy of a Case Study, and/or Citing Your Sources Guide for additional information. Thanks for your help!
Solend is a lending protocol for Solana. The smart contract hot wallets had a vulnerability which allowed an attacker to escalate their permissions and change configuration parameters in a new lending market. This would have allowed them to steal the funds of users on a much larger scale. Luckily, the issue was detected early, and only $16k of funds were liquidated.
Compensation was made to all affected users, and a series of steps were undertaken to secure the smart contract further.
This is a global/international case not involving a specific country.[1][2][3][4][5][6][7][8]
About Solend
"Solend is the autonomous interest rate machine for Solana. Earn interest on deposits and borrow assets on the fastest, lowest fee, and most scalable lending protocol."
"Solend is an algorithmic, decentralized protocol for lending and borrowing on Solana. Lending and borrowing has proven itself as being key in a DeFi ecosystem. However, current products are slow and expensive. On Solana, Solend can scale to being 100x faster and 100x cheaper. Solend aims to be the easiest to use and most secure solution on Solana."
"At 2021-08-19 12:40 GMT, an attacker attempted to exploit the Solend smart contract. They subverted an insecure auth check on the UpdateReserveConfig function to make accounts with borrows liquidatable and set the borrow APY to 250% for all markets."
"First, the attacker created a new Lending Market (tx). Next the configs for USDC, SOL, ETH, BTC reserves were updated (tx, tx, tx, tx)." "Reserve configs were updated." "[I]t's clear the attacker intended to steal funds by wrongfully liquidating accounts with an outsized bonus. We estimate that around $2M was at risk."
"The attacker was able to update the reserve configs by using the newly created Lending Market to subvert an auth check." "The highlighted checks were insufficient, since the attacker was able to pass in an arbitrary Lending Market created and owned by them."
"The attempt to steal funds was detected and stopped by the Solend team in time such that no funds were stolen. A handful of users (5) were liquidated by Solend's liquidator, but those users were refunded out of the liquidator's undue earnings (~16K USD)."
"No liquidations occurred except by our liquidator bot. It appears the attacker's attempts to liquidate didn't work. Note that by default on Solana, txs are simulated locally and never sent to a validator if the simulation run fails. Because of this, we have no way of knowing if there were failed liquidation attempts."
"The team quickly detected, investigated, and found the issue." They identified a list of steps they plan to take in the future, including "[i]mplement[ing a] stricter code review policy", scheduling a "follow-up audit of diff", "[i]ncreas[ing the] bug bounty size", "[a]dd[ing] alerts to [a] monitoring service", "[w]rit[ing] an incident response playbook", "[r]econcil[ing the] wrongfully liquidated accounts", "adding [a] circuit breaker", and "adding speed bumps". "A fix was implemented and deployed. Wrongful liquidations were inspected and reconciled with a 2% bonus."
This is a global/international case not involving a specific country.
The background of the exchange platform, service, or individuals involved, as it would have been seen or understood at the time of the events.
Include:
- Known history of when and how the service was started.
- What problems does the company or service claim to solve?
- What marketing materials were used by the firm or business?
- Audits performed, and excerpts that may have been included.
- Business registration documents shown (fake or legitimate).
- How were people recruited to participate?
- Public warnings and announcements prior to the event.
Don't Include:
- Any wording which directly states or implies that the business is/was illegitimate, or that a vulnerability existed.
- Anything that wasn't reasonably knowable at the time of the event.
There could be more than one section here. If the same platform is involved with multiple incidents, then it can be linked to a main article page.
The Reality
This sections is included if a case involved deception or information that was unknown at the time. Examples include:
- When the service was actually started (if different than the "official story").
- Who actually ran a service and their own personal history.
- How the service was structured behind the scenes. (For example, there was no "trading bot".)
- Details of what audits reported and how vulnerabilities were missed during auditing.
What Happened
The specific events of the loss and how it came about. What actually happened to cause the loss and some of the events leading up to it.
| Date | Event | Description |
|---|---|---|
| August 19th, 2021 | Main Event | Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here. |
Technical Details
This section includes specific detailed technical analysis of any security breaches which happened. What specific software vulnerabilities contributed to the problem and how were they exploited?
Total Amount Lost
The total amount lost has been estimated at $16,000 USD.
How much was lost and how was it calculated? If there are conflicting reports, which are accurate and where does the discrepancy lie?
Immediate Reactions
How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed?
Ultimate Outcome
What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?
Total Amount Recovered
There do not appear to have been any funds recovered in this case.
What funds were recovered? What funds were reimbursed for those affected users?
Ongoing Developments
What parts of this case are still remaining to be concluded?
Individual Prevention Policies
No specific policies for individual prevention have yet been identified in this case.
For the full list of how to protect your funds as an individual, check our Prevention Policies for Individuals guide.
Platform Prevention Policies
Policies for platforms to take to prevent this situation have not yet been selected in this case.
For the full list of how to protect your funds as a financial service, check our Prevention Policies for Platforms guide.
Regulatory Prevention Policies
No specific regulatory policies have yet been identified in this case.
For the full list of regulatory policies that can prevent loss, check our Prevention Policies for Regulators guide.
References
- ↑ blocksec-incidents/2021.md at main · openblocksec/blocksec-incidents · GitHub (Aug 11, 2021)
- ↑ SLND-INCDT-01 Report (Public) - Google Docs (Aug 29, 2021)
- ↑ Solend (Sep 15, 2021)
- ↑ Introduction to Solend - Solend (Sep 15, 2021)
- ↑ Explorer | Solana (Sep 28, 2021)
- ↑ Explorer | Solana (Sep 28, 2021)
- ↑ Explorer | Solana (Sep 28, 2021)
- ↑ Explorer | Solana (Sep 28, 2021)