CVE-2026-107846
Received Received - Intake

Merkle Root Validation Bypass in bitcoinjs-lib

Vulnerability report for CVE-2026-107846, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-04

Last updated on: 2026-11-04

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-04
Last Modified
2026-11-04
Generated
2026-11-04
AI Q&A
2026-11-04
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 3 associated CPEs
Vendor Product Version / Range
bitcoinjs bitcoinjs-lib >= 2.3.0, < 5.2.1
bitcoinjs bitcoinjs-lib >= 6.0.0, < 6.1.8
bitcoinjs bitcoinjs-lib >= 7.0.0-rc.0, < 7.0.2

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-354 The product does not validate or incorrectly validates the integrity check values or "checksums" of a message. This may prevent it from detecting if the data has been modified or corrupted in transmission.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in bitcoinjs-lib involves a flaw in Merkle tree root computation where duplicate transactions can be added without detection. The fastMerkleRoot function pads odd-level Merkle trees by duplicating the last node but fails to report adjacent duplicates. This allows attackers to forge transaction lists while maintaining the same Merkle root and block ID, bypassing validation.

Detection Guidance

To detect this vulnerability, check if your bitcoinjs-lib version is below 5.2.1, 6.1.8, or 7.0.2. Use commands like 'npm list bitcoinjs-lib' or 'npm ls bitcoinjs-lib' to verify the installed version. If affected, inspect Merkle root calculations for duplicate transactions by reviewing block validation logs or using custom scripts to compare transaction lists against computed Merkle roots.

Impact Analysis

The impact includes potential double-spending, chain splits, or denial-of-service attacks. Malicious blocks with duplicated transactions can be relayed without requiring proof-of-work changes. Consumers relying on block-root validation, such as explorers, exchange indexers, or SPV clients, may process transactions twice or reject honest blocks.

Mitigation Strategies

Upgrade bitcoinjs-lib to the latest patched versions (5.2.1, 6.1.8, or 7.0.2) immediately. If using a Node.js application, run 'npm update bitcoinjs-lib' or specify the fixed version in your package.json. For systems relying on block validation, ensure Merkle root checks include duplicate transaction detection by updating validation logic to use the patched functions with the 'mutated' parameter.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-107846. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...