DeepHorus is an innovative tech media and intelligence platform focused on AI, blockchain, startups, and emerging technologies.
Published on

Bitcoin wallet bug let rogue servers steal funds when users tried to speed up payments

Authors
  • avatar
    Name
    DeepHorus
    Twitter

Electrum, one of Bitcoin’s oldest software wallets, disclosed a vulnerability that let malicious servers trick users into signing payments to attackers. The flaw affected people trying to speed up unconfirmed transactions using Replace-by-Fee. Developers confirmed at least one theft before releasing a patch.

Unlike a full Bitcoin node, Electrum relies on outside servers to retrieve transaction histories and broadcast payments. Before the fix, it trusted those servers to report pending transactions without verifying signatures. An attacker controlling a server could intercept a payment before it reached the network and replace it in wallet history with a fake transaction.

The fake transaction spent the user’s coins to an attacker-controlled address using invalid signatures Electrum failed to detect. It appeared pending, sometimes with no fee at all, so it looked stuck. When users chose Replace-by-Fee to raise the fee, Electrum could sign a valid replacement sending coins to the attacker. Attackers also generated receiving addresses whose last four characters matched the legitimate destination.

Electrum received two reports in October. The first, submitted Oct. 11, involved a two-of-three multisignature wallet using two Trezor hardware devices; that user did not report losing funds. A second user reported on Oct. 18 that they raised the fee on a substituted transaction and lost money.

Electrum released version 4.8.3 on Oct. 24, adding signature checks for unconfirmed transactions spending coins from the user’s wallet. Earlier versions remain vulnerable when connected to malicious servers. Developers have not disclosed the amount stolen or identified the malicious servers.

The developers recommend upgrading and checking receiving addresses and amounts before signing payments. Users connected only to servers they trust, including their own, were not exposed. The fix came six days after the first reported theft.