---
id: "CVE-2026-107846"
kind: "vulnerability"
aliases: ["CVE-2026-107846"]
title: "bitcoinjs-lib: duplicate transactions pass Merkle root check, block rejection risk"
severity: "critical"
cvss: 9.3
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["bitcoin", "bitcoinjs-lib", "blockchain-indexer", "browser", "node.js", "package", "spv"]
not_affected_if: ["fixed-version", "no-block-validation"]
published_at: "2026-11-04T19:17:18+00:00"
first_seen_at: "2026-11-04T19:28:47+00:00"
updated_at: "2026-11-04T19:30:02+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-107846", "first_seen_at": "2026-11-04T19:28:47+00:00"}]
---

# bitcoinjs-lib: duplicate transactions pass Merkle root check, block rejection risk

bitcoinjs-lib, a JavaScript Bitcoin library, fails to detect duplicated Merkle-tree transactions when validating a block root. A peer can append duplicate transactions to a block so a different transaction list keeps the original Merkle root, letting consumers double-process a transaction or reject an honest block.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version of `bitcoinjs-lib` in your lockfile or with `npm ls bitcoinjs-lib`.
- Look for calls to `Block.checkMerkleRoot()`, `checkTxRoots()` or `__checkMerkleRoot` in your code.

## Fix

- Upgrade to `5.2.1`, `6.1.8` or `7.0.2`, matching your major version line.

## Timeline

- 2026-11-04T19:28:47+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-107846

## Documents

- [advisory] Vendor advisory: github.com https://github.com/bitcoinjs/bitcoinjs-lib/security/advisories/GHSA-8vv3-6qpc-gpw6
- [fix] Patch: github.com https://github.com/bitcoinjs/bitcoinjs-lib/commit/009f165edfbf925cad8964b2dce478d18dd19449
- [fix] Patch: github.com https://github.com/bitcoinjs/bitcoinjs-lib/commit/b79c7714c0687473dc6e25c69fc5fc597302c7a0
- [fix] Patch: github.com https://github.com/bitcoinjs/bitcoinjs-lib/commit/f3434d1e4bb5e0784fe769c4cd08a243576232a1

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
