CVE-2017-12842
Bitcoin Core vulnerability analysis and mitigation

Overview

Bitcoin Core before 0.14 contained a vulnerability (CVE-2017-12842) that allowed an attacker to create an ostensibly valid SPV proof for a payment to a victim who uses an SPV wallet, even if that payment did not actually occur. The vulnerability was discovered in August 2017 and was related to the lack of commitment to block merkle tree depth in Bitcoin's design (Bitcoin Wiki, Bitslog).

Technical details

The vulnerability stems from Bitcoin Merkle tree making no distinction between inner nodes and leaf nodes. The depth of the tree is implicitly given by the number of transactions. Inner nodes have no specific format and are 64 bytes in length. This allows an attacker to submit a transaction that has exactly 64 bytes in length and then force a victim system to re-interpret this transaction as an inner node of the tree. An attacker can therefore provide an SPV proof that adds an additional leaf node extending the dual transaction/node and provide proof of payment of any transaction they wish (Bitslog).

Impact

The vulnerability would allow an attacker to create a valid SPV proof for a fake payment to a victim using an SPV wallet, even though the payment did not actually occur. Completing the attack would cost more than a million dollars and is mainly relevant in situations where an autonomous system relies solely on an SPV proof for transactions of a greater dollar amount (Bitcoin Wiki).

Mitigation and workarounds

The vulnerability was fixed in Bitcoin Core version 0.14. Additionally, simple probabilistic protections could be implemented by SPV wallets. One recommended mitigation was for SPV wallets to check that every internal 64-bit node of the SPV proof is not a valid transaction. Since there are no 64-byte Bitcoin transactions that pass standard-checks, the presence of such transaction should raise an alarm (Bitslog).

Additional resources


SourceThis report was generated using AI

Related Bitcoin Core vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-54605HIGH7.5
  • Bitcoin CoreBitcoin Core
  • cpe:2.3:a:bitcoin:bitcoin_core
NoYesOct 28, 2025
CVE-2025-54604HIGH7.5
  • Bitcoin CoreBitcoin Core
  • cpe:2.3:a:bitcoin:bitcoin_core
NoYesOct 28, 2025
CVE-2024-52922MEDIUM6.5
  • Bitcoin CoreBitcoin Core
  • cpe:2.3:a:bitcoin:bitcoin_core
NoYesNov 18, 2024
CVE-2024-55563MEDIUM5.3
  • Bitcoin CoreBitcoin Core
  • cpe:2.3:a:bitcoin:bitcoin_core
NoNoDec 09, 2024
CVE-2024-52921MEDIUM5.3
  • Bitcoin CoreBitcoin Core
  • cpe:2.3:a:bitcoin:bitcoin_core
NoYesNov 18, 2024

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management