Uncovering FTX Bankruptcy: Reserves, SBF, Alameda & Binance
FTX Bankruptcy: SBF, Alameda, Binance, VC funds, hack, federal investigation, Proof of Reserves, calls for transparency
🇺🇦 Hacken stands with Ukraine!Learn more
Crypto exchanges are the banks of the future, accumulating and operating with large amounts of clients’ funds and, due to the KYC process, are responsible for handling a considerable amount of sensitive data. Therefore, security is a serious issue that should be addressed in advance. We’ve decided to make a research regarding vulnerability disclosure and vulnerability handling process inside these organizations to check how they addressed external reports from researchers. Based on our internal security experience of pentesting exchanges and participating in bug bounties, during last year one vulnerability was pretty common for crypto exchanges. We took this vulnerability as a reason to chat with them. Check the results below.
TradingView Charting Library is very popular across cryptocurrency exchange platforms. Most crypto exchanges use this library as a function in their services to display online trading charts. On September 24, 2018, data on high-risk DOM Based XSS library vulnerabilities was introduced. All exchanges using this library were vulnerable.
The XSS vulnerability can be used to bypass built-in security measures, conduct advanced phishing attacks, or even to perform unauthorized transactions.
Any web app, using the TradingView Charting Library in its services, stores a publicly accessible HTML file called `tv-chart.html` on the server. This file is used to initialize trading charts through location.hash parameters. As a result of the charts initialization, the iframe link to the page of the following type is loaded onto the page.
The vulnerability was located in the third-party trading charts loading function. The function used a link obtained from the user input of the `indicatorsFile` parameter, and transferred it to `$.getScript()`.
When users clicked that link, the following code was executed: xss.rocks/xss.js.
After the vulnerability had been publicly disclosed, TradingView released a new library version to fix it. The function, responsible for loading third-party charts, was changed. The new version of this function looked as follows.
This fix was incorrect and the vulnerability can still be reproduced using the `customIndicatorsUrl` parameter while adding the `uid=urlParams` parameter.
As of this moment, a new library version has been released. It completely fixes the vulnerability.
All exchange platforms, included in the CoinMarketCap list, were tested for vulnerable library version. As a result, 90 vulnerable exchange services were identified, including those with top trading volumes.
All vulnerable exchanges were notified of the vulnerability.
Poor security communication and no responsible disclosure have led to an unpatched vulnerability in dozens of crypto exchanges leaving users’ money accounts under threat. If you use the TradingView Charting Library in your services, you have to check its version and update it in case the vulnerability is revealed.