All Blogs
Exchange API Key Hacks - Part 1
Industry Insight
February 4, 2025

Exchange API Key Hacks - Part 1

This blog, the first in a series, explores the rising threat of Exchange API key hacks, including the risks and security challenges.

Introduction

In the trading realm of Web3, Trading API keys (typically referred to as Exchange API keys) are the foundational connectors that enable seamless programmatic interaction between platforms, traders, and automated systems. However, their critical role comes with inherent risks that can lead to devastating consequences if improperly secured. For business leaders, security and ops teams, and developers alike, understanding the challenges and solutions around API key security is essential to building trust and protecting valuable assets. 

This blog is the first of several on this topic, and will focus on the security challenges.

Understanding Exchange API Keys

Exchange API keys are unique identifiers that allow applications to interact with cryptocurrency exchange platforms on behalf of users or other businesses. They’re the backbone of automation for trading strategies, portfolio management, and market data retrieval. With customizable permissions, these keys can enable specific actions, such as executing trades or withdrawing funds, without requiring manual intervention.

A relatively unique aspect of Trading Keys is that they are used to sign the requests sent to the exchange, similar to how transactions are signed before they are sent on-chain.

When creating an API key on the exchange, the user can usually determine the following:

  • Permission level: Read-only, Trade-only, Withdrawal (moving funds to on-chain addresses).
  • Configure policies: Limit trading pairs, withdrawal limits and whitelist specific IPs.

The Security Challenges of API Keys

Exchange API keys are a significant security challenge for several reasons. First, as with other sensitive keys in Web3, if compromised, they can lead to immediate loss of funds that cannot be retrieved. Secondly, looking at the terms of service of most exchanges reveals that the responsibility for managing the keys securely is completely delegated to the user, and that the exchange takes zero responsibility for any potential loss. 

Moreover, as private key security becomes increasingly robust, Exchange API keys are becoming a favorable target for external and internal rogue players - creating a major challenge for security teams.

Key security threats and challenges associated with API key security that users of Exchange API keys need to address are:

  1. Unauthorized Access To Funds
    If API keys are exposed or stolen, attackers can exploit them to gain unauthorized access to the funds on the exchange. This could lead to unauthorized trades, fraudulent withdrawals, or the manipulation of market positions — posing serious financial and reputational risks for businesses. 
  2. Insecure Storage and Transmission
    API keys stored in plaintext or hard-coded into applications are easy targets for attackers, whether external or internal (rogue employees). Also, even if stored within a secret manager, once they are fetched by a machine for trading, they can be compromised. 
  3. Human Error
    Many API key compromises occur due to simple mistakes, like accidentally sharing keys in repositories accessible to rogue actors or failing to rotate keys regularly. These errors, while avoidable, remain a common entry point for attackers.
  4. Insufficient Access Control
    Not all API implementations offer fine-grained access controls. This means keys may have broader permissions than necessary, increasing the impact of a potential compromise. For example, a single compromised key might grant both trading and withdrawal rights.
  5. Exploitation of API Key Databases
    Hackers have also targeted centralized databases storing API keys. The 3Commas incident in 2022 saw attackers leaking over 100,000 of API keys, enabling widespread unauthorized transactions. Such breaches highlight the systemic risks posed by poor security practices at the organizational level.

Unlike on-chain hacks that are public, many hacks that are associated with API keys are either not reported or reported as a general hack. Moreover, numerous discussions with security experts in the industry shows an alarming concern about the potential risk to every company or user that uses API keys, that is just waiting to happen. 

Summary

Within cryptocurrency exchanges, API keys are indispensable, granting traders the ability to execute trades, access real-time market data, and manage their accounts programmatically. However, as their utility has grown, so too have the associated security vulnerabilities, leading to significant financial losses when these keys are compromised.

The next blog will discuss the current solutions for securing Exchange API Keys and how attackers get past them.

About Sodot

Sodot is an MPC key management infrastructure company built by a seasoned team of applied cryptographers and security experts. Sodo’t MPC infrastructure is designed for building custodial and self-custodial solutions, with full operational control and minimum dependencies.