Skip to main content
← Vulnerabilities

bitcoinjs-lib: Undetected merkle node duplication in block root computation validates a forged transaction list

bitcoinjs-lib versions 2.3.0 through 5.2.0, 6.0.0 through 6.1.7, and 7.0.0-rc.0 through 7.0.1 are affected. Fixed in 5.2.1, 6.1.8, and 7.0.2.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

9.3CriticalCNA
Exploited
No known exploitation
Fix
Fixed in 5.2.1, 6.1.8, 7.0.2
Who is exposed
Not reported

Do first: Upgrade to a fixed version: 5.2.1, 6.1.8, 7.0.2.

26Pcve.now Index 26 of 100 · methodology v3 · provisional
  • Exploitation?/40Exploitation: unknown (data gap). No CISA SSVC exploitation rating yet
  • Exposure17/25No login or user action needed, reachable over the network without a login · Data gap: Advisories don't say whether default setups are affected
  • Reach?/20Reach: unknown (data gap). No tracked technology or package matched
  • Severity9.3/10CVSS 9.3
  • No patch0/5No signal

What would change the score

  • Would score about 71 if added to CISA KEV
  • Would score about 66 if CISA's SSVC rates exploitation active
  • Would score about 31 if advisories confirm default setups are exposed

CVE-2026-107846 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 9.3 (critical) and affects bitcoinjs-lib; fixed in 5.2.1, 6.1.8 and 7.0.2.

Published
Last modified
Published
Not listed in CISA KEV
26/100 · provisional
Unclear
Fix
Fixed in 5.2.1, 6.1.8, 7.0.2
None on Exploit-DB, Metasploit or GitHub
On X
View the cve.now post

Summary

bitcoinjs-lib, a JavaScript Bitcoin library for Node.js and browsers, fails to detect duplicated Merkle tree nodes, so a remote attacker without login can append duplicate transactions to a block while keeping the original block root and identifier. Services that rely on this validation, such as explorers, exchange indexers, or SPV clients, can then process a duplicated transaction twice or reject the honest block.

Read the original description

bitcoinjs-lib is a JavaScript Bitcoin library for Node.js and browsers. From 2.3.0 until 5.2.1, 6.1.8, and 7.0.2, fastMerkleRoot pads odd Merkle-tree levels by hashing the final node with itself but does not report adjacent duplicate hashes. The affected block-root verifier was introduced as Block.checkMerkleRoot() alongside Block.calculateMerkleRoot(), while later versions expose validation through checkTxRoots() and __checkMerkleRoot; these validation paths can accept a recomputed root without checking for mutation. A peer can append duplicate transactions so a different transaction list retains the original Merkle root, block header, proof of work, and block identifier. Consumers that rely on block-root validation, including explorers, exchange indexers, or SPV clients, can process a duplicated transaction twice or blacklist the shared block hash and reject the honest block. This issue is fixed in versions 5.2.1, 6.1.8, and 7.0.2.

What to do

  • Upgrade to a fixed version: 5.2.1, 6.1.8, 7.0.2.

Timeline

  1. CVE published
  2. First seen by cve.now
  3. Posted on X by cve.now

Affected versions

  • bitcoinjs bitcoinjs-lib

    From 2.3.0 · fixed in 5.2.1; From 6.0.0 · fixed in 6.1.8; From 7.0.0-rc.0 · fixed in 7.0.2

Evidence 4

  1. Advisory
  2. Repository
  3. Repository
  4. Repository

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

FAQ

Questions about CVE-2026-107846

Is CVE-2026-107846 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

The library does not detect when a merkle tree node is duplicated during block root computation. As a result, a forged transaction list can validate against the computed block root.Source: github.com

Which versions are affected by CVE-2026-107846?

bitcoinjs-lib: from 2.3.0 before 5.2.1; from 6.0.0 before 6.1.8; from 7.0.0-rc.0 before 7.0.2.Source: cve.now feed data

Am I affected, and how do I check?

Affected versions are bitcoinjs-lib 2.3.0 through 5.2.0, 6.0.0 through 6.1.7 (including 6.1.0-rc.0), and 7.0.0-rc.0 through 7.0.1. To check, look at the bitcoinjs-lib version listed in your project's package.json or lockfile, or run npm ls bitcoinjs-lib.Source: github.com

How do I fix CVE-2026-107846?

Upgrade to the fixed release for your version line: 5.2.1, 6.1.8, or 7.0.2.Source: github.com