Skip to content
Crypto Disclosed report Intermediate

Coinbase Android Security Vulnerabilities

The Coinbase Android app did not verify SSL certificates, did not sign or protect API requests against tampering or replay, and embedded a consumer id and secret that were publicly available. An attacker on the same network could intercept and modify traffic, steal access tokens, and replay or alter bitcoin transactions.

bryanstern Follow

Originally disclosed on HackerOne

  • Paid in 27 days
  • Disclosed after 57 days

My name is Bryan Stern and I am Android Software Engineer. Last night I took another look at your Android application and found some disturbing vulnerabilities that could allow for a user's account to be hijacked. Fortunately, they are very easy to resolve. Below I have outlined the issue, gave some recommendations, and attached some screenshots.

Coinbase for Android Security Flaws:

  1. The application does not perform any SSL certificate verification.
  2. The API design does not prevent request tampering or replays.
  3. The consumer id and secret of the app is widely available.

Potential for damage:

  1. Without implementing your own SSL certificate validation in the Coinbase app, a "man in the middle" can sniff and alter communication between the application and Coinbase API. A malicious hacker could then use this to violate user privacy as well as take advantage of the other two flaws listed. Worse, an attacker could steal the access token provided in network responses and have full API access to the user's Coinbase account using the widely available Coinbase Android consumer id and secret.
  2. Because requests are neither adequately protected by SSL, nor are they signed, an attacker could repeat or tamper with requests. For example, an attacker could repeat requests to buy bitcoin, sell bitcoin, or send bitcoin requests from the app to either empty their associated bank account, sell bitcoins needed by the user, or repeat a transfer bitcoins to another account. Not only can transactions be repeated, they can be modified in transit. So, for example, an attacker could change the recipient (and/or amount) of a transaction request.
  3. The consumer id and secret exposure means that their is no trusted secret between the Coinbase Android app and the Coinbase API. This means any program could make requests to the Coinbase API pretending to be the Coinbase Android app. You would not be able to block the abuser of the Coinbase API without disabling the Coinbase Android app until a new build with a new consumer id and secret was distributed.

How to establish the man in the middle attack on Android

  1. Set up a proxy server that the Android device will route traffic through. I use www.charlesproxy.com for this.
  2. Install the SSL certificate on the device that the proxy will present as Coinbase's SSL certificate to it's clients. (www.charlesproxy.com/charles.crt)
  3. Configure your device to point it's traffic through Charles.
  4. Enable SSL
  5. View, repeat, and modify requests in Charles Proxy.

Availability of the Consumer Id and Secret

  1. It is publicly available in the GitHub repository. (https://github.com/coinbase/coinbase-android/blob/bc6a03229416736acc2ea6bc2fb13f55f7029751/coinbase-android/src/com/coinbase/api/LoginManager.java#L49)
  2. It is visible in many requests made by the device when monitoring requests during the man in the middle attack.

Recommendations:

  1. Read the Android Documentation on SSL.
  2. Sign OAuth requests and use nonces. See Twitter's documentation for an example. https://dev.twitter.com/docs/auth/creating-signature
  3. Change your consumer id and secret and keep them confidential. There is no need to ever send the consumer secret if requests are signed using it.
  4. Based on the available source code, I see that ProGuard is not being used. I highly recommend it both to obfuscate your compiled code and for some of the optimizations available.

Please let me know how much time you may need to resolve these issue as I would like to publish this on my own blog soon (~3 weeks). If you have any questions, I would be more than happy to answer any questions and walk your developers through the issues.

Best Regards, Bryan Stern

The original report as published on HackerOne, by bryanstern. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the app relied on the platform's default network stack without implementing certificate pinning or custom validation, did not sign API requests, and shipped a static consumer secret in public source code.

Impact

An attacker could steal access tokens and gain full API access to a user's account, replay or modify bitcoin transactions, and impersonate the app using the exposed consumer id and secret.

What the attacker needed

Attacker on same network; victim uses the Android app; proxy certificate trusted by device

The fix

The app should implement SSL certificate validation, sign OAuth requests with nonces, keep the consumer secret confidential, and use ProGuard to obfuscate code.

How it was found

  1. Set up a proxy server that the Android device routes traffic through.
  2. Install the proxy's SSL certificate on the device so it is trusted.
  3. Configure the device to send its traffic through the proxy.
  4. Enable SSL interception in the proxy.
  5. View, repeat, and modify requests in the proxy.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When an app talks to a server, it should check that the server's certificate is genuine, like checking a passport. This app skipped that check, so someone on the same Wi-Fi could pretend to be the server, read the conversation, and change messages. The app also had a secret key that anyone could find online, which made it easier to impersonate the app.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More from Coinbase

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.