All vulnerabilities

npm

CVE-2026-107846

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

Severity
Critical
Published
10 Nov 2026
Last changed
10 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
5.2.1, 6.1.8, 7.0.2
Exploit chance
0.3% in the next 30 daysHigher than 16% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-354
Also known as
GHSA-8vv3-6qpc-gpw6
Sources
OSV.dev and GitHub

Description

fastMerkleRoot pads an odd level by hashing the last node with itself. It does not report that it did so, and checkTxRoots never looks for repeated transactions. A peer can therefore duplicate transactions to fill the pad and produce a block with a different transaction list but the same merkle root. The block hash and block id do not change, so the header still carries valid proof of work. In the proof of concept a real mainnet block goes from nine transactions to ten, and separately to twelve, with the same id every time, and checkTxRoots accepts all three. Bitcoin Core rejects this case through the mutated flag in ComputeMerkleRoot and the bad-txns-duplicate reason in CheckBlock. This is CVE-2012-2459.

A bitcoin merkle tree pads an odd level by hashing the last node with itself. Duplicating transactions to fill that pad therefore yields the same root for a different transaction list. This is CVE-2012-2459.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
bitcoinjs-libnpm · osv:npm: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

About bitcoinjs-lib

Weekly downloads (npm)
1,117,282npm, 24 Nov 2026

This is the only vulnerability in bitcoinjs-lib in our list.

References