{"id":"CVE-2026-107846","kind":"vulnerability","aliases":["CVE-2026-107846"],"related":[],"title":"bitcoinjs-lib: duplicate transactions pass Merkle root check, block rejection risk","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.","summary":"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.","severity":"critical","cvss":9.3,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["bitcoin","bitcoinjs-lib","blockchain-indexer","browser","node.js","package","spv"],"not_affected_if":["fixed-version","no-block-validation"],"how_to_check":"- Check the installed version of `bitcoinjs-lib` in your lockfile or with `npm ls bitcoinjs-lib`.\n- 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.","status":"open","published_at":"2026-11-04T19:17:18+00:00","first_seen_at":"2026-11-04T19:28:47+00:00","triaged_at":"2026-11-04T19:30:02+00:00","updated_at":"2026-11-04T19:30:02+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-11-04T19:30:02Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade to `5.2.1`, `6.1.8` or `7.0.2`, matching your major version line.","reach":"network","title":"bitcoinjs-lib: duplicate transactions pass Merkle root check, block rejection risk","impact":"medium","summary":"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.","audience":"developers","category":"package","nicknames":[],"who_cares":["bitcoinjs-lib","node.js","browser","bitcoin","spv","blockchain-indexer"],"confidence":0.7,"fix_status":"available","needs_auth":"no","worst_case":"duplicate transactions processed twice or honest blocks rejected","analyst_note":"Confirm the exact affected version ranges and which validation functions were exposed in each release from the linked GitHub advisory.","how_to_check":"- Check the installed version of `bitcoinjs-lib` in your lockfile or with `npm ls bitcoinjs-lib`.\n- Look for calls to `Block.checkMerkleRoot()`, `checkTxRoots()` or `__checkMerkleRoot` in your code.","plain_action":"","needs_analyst":true,"not_affected_if":["no-block-validation","fixed-version"],"who_is_affected":"Applications that use bitcoinjs-lib to validate Bitcoin block Merkle roots are exposed, including explorers, exchange indexers and SPV clients that accept blocks from peers. Versions from 2.3.0 up to the fixed releases are affected. Projects that do not call the block-root validation paths can skip it, though the sources do not say which code paths are safe.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"critical"},"cost_usd":0.000782,"input_tokens":4423,"output_tokens":679,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-107846':15A,18A '-2026':14A,17A '2.3.0':94C '5.2.1':96C,216C '6.1.8':97C,217C '7.0.2':99C,219C 'accept':146C 'adjac':118C 'affect':122C 'alongsid':131C 'append':53B,157C 'bitcoin':19B,35B,87C 'bitcoinj':2A,21B,31B,82C 'bitcoinjs-lib':1A,20B,30B,81C 'blacklist':200C 'block':10A,48B,58B,80B,124C,170C,176C,183C,203C,209C 'block-root':123C,182C 'block.calculatemerkleroot':132C 'block.checkmerkleroot':130C 'blockchain':24B 'blockchain-index':23B 'browser':26B,92C 'check':9A,151C 'checkmerkleroot':141C 'checktxroot':139C 'client':192C 'consum':70B,178C 'cve':13A,16A 'detect':39B 'differ':61B,162C 'doubl':72B 'double-process':71B 'duplic':4A,40B,54B,119C,158C,196C 'exchang':188C 'explor':187C 'expos':136C 'fail':37B 'fastmerkleroot':100C 'final':110C 'fix':213C 'hash':108C,120C,204C 'header':171C 'honest':79B,208C 'identifi':177C 'includ':186C 'index':25B,189C 'introduc':128C 'issu':211C 'javascript':34B,86C 'keep':64B 'later':134C 'let':69B 'level':106C 'lib':3A,22B,32B,83C 'librari':36B,88C 'list':63B,164C 'merkl':7A,42B,67B,104C,168C 'merkle-tre':41B,103C 'mutat':153C 'node':111C 'node.js':27B,90C 'odd':102C 'origin':66B,167C 'packag':28B 'pad':101C 'pass':6A 'path':144C 'peer':51B,155C 'process':73B,194C 'proof':172C 'recomput':148C 'reject':11A,77B,206C 'reli':180C 'report':117C 'retain':165C 'risk':12A 'root':8A,49B,68B,125C,149C,169C,184C 'share':202C 'spv':29B,191C 'transact':5A,44B,55B,62B,75B,159C,163C,197C 'tree':43B,105C 'twice':198C 'valid':46B,137C,143C,185C 'verifi':126C 'version':135C,215C 'without':150C 'work':174C","nicknames":[],"mitigations":[],"who_affected":"Applications that use bitcoinjs-lib to validate Bitcoin block Merkle roots are exposed, including explorers, exchange indexers and SPV clients that accept blocks from peers. Versions from 2.3.0 up to the fixed releases are affected. Projects that do not call the block-root validation paths can skip it, though the sources do not say which code paths are safe.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["bitcoin","bitcoinjslib","blockchainindexer","browser","critical","nodejs","package","spv"],"campaign_type":null,"first_public_at":"2026-10-26T18:39:55+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-107846","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-107846","severity":null,"published_at":"2026-11-04T19:17:18+00:00","modified_at":"2026-11-04T19:17:18+00:00","first_seen_at":"2026-11-04T19:28:47+00:00","fetched_at":"2026-11-04T19:28:47+00:00","note":null}],"documents":[{"id":69721,"url":"https://github.com/bitcoinjs/bitcoinjs-lib/commit/009f165edfbf925cad8964b2dce478d18dd19449","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":69722,"url":"https://github.com/bitcoinjs/bitcoinjs-lib/commit/b79c7714c0687473dc6e25c69fc5fc597302c7a0","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":69723,"url":"https://github.com/bitcoinjs/bitcoinjs-lib/commit/f3434d1e4bb5e0784fe769c4cd08a243576232a1","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":69724,"url":"https://github.com/bitcoinjs/bitcoinjs-lib/security/advisories/GHSA-8vv3-6qpc-gpw6","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-10-26T18:39:55+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}