All vulnerabilities
CRITICALAppSecexploited in the wild

APPSEC-COINBASE-TRADE-LOGIC-2022

API · Finance · Coinbase Retail Advanced Trading API

Summary

In February 2022, a researcher known as Tree of Alpha reported a business-logic flaw in Coinbase's Retail Advanced Trading API through HackerOne, earning a $250,000 bounty that Coinbase described as its largest ever. Coinbase stated the underlying cause was a missing logic validation check in a Retail Brokerage API endpoint that allowed a user to submit trades to a particular order book using a mismatched source account. Because the order-validation logic never verified that the named source account actually held the asset being sold, a user could place sell orders for a cryptocurrency they did not own; the reproduction example sold one asset while sourcing it from an account holding a different token. This maps to OWASP API6:2023 Unrestricted Access to Sensitive Business Flows, an improper-validation business-logic error rather than a missing cryptographic or session control. Coinbase reproduced the bug, halted retail advanced trading into cancel-only mode within an hour of the report, and validated a patch the same day.

How to avoid it in your code

  • Validate that the action's source account or resource actually holds the asset before executing the order.
  • Confirm the source account belongs to the authenticated caller on every trade endpoint.
  • Enforce server-side balance and ownership checks atomically inside order placement, not client-side.
  • Add invariant tests asserting no order can move assets an account does not hold.
  • Gate sensitive financial flows behind explicit authorization and anomaly monitoring.

References

Related vulnerabilities

All AppSec →