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.
- 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.
- 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.
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- Published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 26/100 · provisional
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Unclear
- Fix
- Fixed in 5.2.1, 6.1.8, 7.0.2
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
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
- CVE published
- First seen by cve.now
- 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
- Advisory
- Repository
- Repository
- Repository
Corrections
None so far.
Something wrong on this page? Report an error. Every fix is listed here.
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