Skip to content
Business logic Disclosed report Advanced

A bug in the Monero wallet balance can enable theft from exchanges

A wallet balance display bug in Monero allows a transaction with a duplicated TX public key to be counted twice, so an exchange credits double the deposited amount. An attacker could repeatedly exploit this to withdraw more than they deposited and drain the exchange's wallet.

jagerman Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 4 hours
  • Fixed in 22 days
  • Disclosed after 27 days

Summary: A Monero bug (already fixed in master) allows theft from exchanges. This has been exploited again a Monero-derived coin, so the exploit may be underway currently.

Description: (fluffypony: Also please mention you spoke to me and I recommended you put it on HackerOne)

PR #3985 fixed a wallet balance display bug, which seems innocuous enough, but this bug also extends to exchanges: a transfer of, e.g., 1 XMR to an exchange with a duplicated TX pub key will show up on an exchange as a 2 XMR deposit, which then allows the attacker to withdraw 2 XMR from the exchange's wallet. An attacker could exploit this repeatedly to siphon of all of the exchange's balance.

Releases Affected:

  • 0.12.2.0, which is currently active and used by exchanges, and likely earlier releases.
  • current master and the 0.12.3.0 PR branch have the fix applied

Steps To Reproduce:

  1. deliberately double-sign a transaction with the tx pub key, e.g. by doubling the add_tx_pub_key_to_extra(tx, txkey_pub); call in src/cryptonote_core/cryptonote_tx_utils.cpp.
  2. Transfer an amount (or send to an exchange)
  3. See 2x the transferred amount appear on the recipient wallet (or the exchange).

Supporting Material/References:

  • I've notified several other Monero-derived coins that I am in contact with, along with Cryptopia.
  • This attack was carried out against ArQmA on altex.exchange; 4 different wallets managed to steal the entire ARQ exchange deposits before the ARQ wallet was put into maintenance.

Impact

Theft of all coins deposited in an exchange wallet.

The original report as published on HackerOne, by jagerman. 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 wallet software failed to deduplicate transactions that contain the same TX public key, causing the same transfer to be counted multiple times.

Impact

Theft of all coins deposited in an exchange wallet; the attack was carried out against ArQmA on altex.exchange, stealing the entire ARQ exchange deposits.

What the attacker needed

Exchange running vulnerable Monero version; attacker can send transactions to exchange

The fix

The bug was fixed in PR #3985 and is present in current master and the [redacted] PR branch.

How it was found

  1. Deliberately double-sign a transaction with the tx pub key by doubling a call in the code.
  2. Transfer an amount to an exchange.
  3. Observe twice the transferred amount appear on the recipient wallet.

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.

A cryptocurrency wallet keeps track of how much money you have. This bug made the wallet count the same incoming payment twice if it had a certain repeated piece of data. An attacker could send a small amount to an exchange, have it counted as double, and then withdraw the larger amount, stealing the difference.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from Monero

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.