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.
Affected software
| Software | Affected versions |
|---|---|
bitcoinjs-libnpm · osv:npm:bitcoinjs-lib |
|
About bitcoinjs-lib
- Weekly downloads (npm)
- 1,117,282npm, 24 Nov 2026
This is the only vulnerability in bitcoinjs-lib in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-107846
- GitHub Advisory Database https://github.com/advisories/GHSA-8vv3-6qpc-gpw6