Skip to main content

bitcoinjs-lib CVE-2026-107846

| EUVDEUVD-2026-117051 CRITICAL
Improper Validation of Integrity Check Value (CWE-354)
2026-11-04 GitHub_M GHSA-8vv3-6qpc-gpw6
9.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Connect as Bitcoin P2P peer
  2. Delivery
    Duplicate trailing tx to fill odd Merkle level
  3. Exploit
    Relay mutated block with unchanged root/id
  4. Execution
    Consumer's checkTxRoots accepts forged tx list
  5. Impact
    Double-credit deposit or blacklist shared block hash

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Integrity verification
Exploitation Conditions

Exploitation requires that the consuming application actually use bitcoinjs-lib's block-root validation path - Block.checkTxRoots()/__checkMerkleRoot() (or the older Block.checkMerkleRoot() introduced in 2.3.0) - as its integrity gate for blocks received from the Bitcoin P2P network; this is the explorer, exchange-indexer, and SPV-client use case named in the advisory. No authentication, no user interaction, and no mining are needed: any peer can relay a mutated copy of an already-on-chain block, duplicating one or more trailing transactions to fill an odd Merkle level, and the recomputed root, header, proof of work, and block id stay identical. The advisory notes most real blocks reach an odd node count at some level and are therefore rewritable. LIMITING FACTORS: applications that use the library only for transaction handling and never invoke block-root validation are unaffected; exposure is confined to affected versions 2.3.0-5.2.0, 6.0.0-6.1.7, and 7.0.0-rc.0-7.0.1, and the fix (threading a mutated flag through fastMerkleRoot so adjacent equal-hash pairs are rejected) is the vendor remediation, with versions below v5 requiring an upgrade to a fixed line rather than an in-line patch.

Impact

Signals are mixed but lean toward real priority for the specific consumer class affected. The vuln.today Decision label is act_now, and the CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) with a 9.3 score describes a network-reachable, low-complexity, unauthenticated attack - consistent with the mechanism, since any Bitcoin P2P peer can relay a mutated block copy with no mining and no header change. The dominant impact is integrity (VI:H / SI:H): a forged transaction list is accepted as carrying the original, valid Merkle root, block header, proof of work, and block id. This is a rediscovery of the well-understood CVE-2012-2459 Merkle-tree malleability class, which Bitcoin Core already defends against via the mutated flag in ComputeMerkleRoot and bad-txns-duplicate in CheckBlock. There is NO CISA KEV listing and NO EPSS score in the supplied data, so neither active-exploitation nor statistical-exploitation-probability signals are available to corroborate the act_now label - the urgency rests on the Decision label, the published proof-of-concept, and the severity vector rather than observed exploitation. The severity is strongly consumer-dependent: the advisory itself notes block validation is a smaller part of this library's usage than transaction handling, and only consumers that gate on checkTxRoots/__checkMerkleRoot (explorers, exchange indexers, SPV clients) are exposed. The given CVSS 4.0 vector asserts VC:L and VA:L/SA:H; the confidentiality claim is weak for this flaw (the real damage is double-counting a transaction or a self-inflicted chain-split DoS from blacklisting the shared block hash), so treat the low confidentiality component as questionable and the integrity/availability components as the true drivers.

Exploit ScenarioDerived

An exchange runs an indexer that ingests blocks from the Bitcoin P2P network and trusts bitcoinjs-lib's checkTxRoots() to validate block integrity. A peer relays a mutated copy of a real on-chain block in which a trailing transaction is duplicated to fill an odd Merkle level; checkTxRoots() still returns true because the recomputed root, block id, and header are unchanged. A working proof-of-concept with demonstrated output on v7.0.1 is published in the GHSA advisory, and the attack requires only network relay (AV:N/AC:L/PR:N) with no mining.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 04, 2026

Merkle-root validation in bitcoinjs-lib (2.3.0 through 5.2.0, 6.0.0 through 6.1.7 including 6.1.0-rc.0, and 7.0.0-rc.0 through 7.0.1) accepts a mutated block whose transaction list has been padded with duplicate entries, so any Bitcoin P2P peer can relay an altered transaction list that keeps the original Merkle root, block header, proof of work and block id. No authentication, user interaction or mining is required (CVSS 4.0 base 9.3, vector PR:N/UI:N); exploitation is limited to consumers that actually gate on android-the library's Block.checkTxRoots()/__checkMerkleRoot() (or the legacy Block.checkMerkleRoot()) path - explorers, exchange indexers and SPV clients - which may process a duplicated transaction twice or blacklist the shared block hash and thereby reject the honest block. The issue is a re-introduction of the CVE-2012-2459 Merkle mutation class; no active exploitation is confirmed (not in CISA KEV), but a public proof-of-concept published in the GHSA advisory demonstrates an honest nine-transaction mainnet block being rewritten to ten and twelve transactions with an identical block id and checkTxRoots() still returning true on v7.0.1, and the vendor decision signal is act_now.

RemediationAI

Upgrade to bitcoinjs-lib 5.2.1, 6.1.8 or 7.0.2 on the corresponding release line (or any later patched release); the fixes are published as commit b79c7714c0687473dc6e25c69fc5fc597302c7a0 (duplicate-pair detection) and 009f165edfbf925cad8964b2dce478d18dd19449 (API plumbing), both linked from https://github.com/bitcoinjs/bitcoinjs-lib/security/advisories/GHSA-8vv3-6qpc-gpw6. Versions below v5 have no in-line patch and must be moved to a fixed line. Where upgrading is blocked, the actionable compensating control is to perform the mutation check in the consuming application rather than trusting checkTxRoots(): reject any block whose transaction list contains a repeated txid, or scan each Merkle level for two adjacent equal hashes in the same way Bitcoin Core's ComputeMerkleRoot does and treat a detected pair as invalid (bad-txns-duplicate). The trade-off is that the consumer must own and maintain that logic and must apply it before any deposit crediting or indexer state change; bitcoinjs-lib's own checkTxRoots() returns true for a mutated block, so relying on it after upgrade-compatibility work is not a substitute. Consumers that only build or parse transactions and never validate block roots need no compensating change beyond keeping the dependency current.

Affected VersionsENISA

bitcoinjs-lib 2.3.0, < 5.2.1
bitcoinjs-lib 6.0.0, < 6.1.8
bitcoinjs-lib 7.0.0-rc.0, < 7.0.2

Affected Packages

npm bitcoinjs-lib fix: 5.2.1, 6.1.8, 7.0.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Bitcoin's Merkle tree pads an odd node count at any level by hashing the last node with itself. Because the padding duplicates an existing hash rather than committing to a distinct value, duplicating trailing transactions can produce a different transaction list with an identical root - the flaw originally tracked as CVE-2012-2459. bitcoinjs-lib's fastMerkleRoot implements that padding (right = left when i + 1 === length) and, before the fix, reported nothing about it: Block.calculateMerkleRoot returned the value unchanged and __checkMerkleRoot only compared it to the header field, with nothing in ts_src scanning for adjacent equal hashes or repeated txids. This is CWE-354, improper validation of an integrity check value. Bitcoin Core defends against the same condition by scanning each level for two adjacent equal hashes before padding in ComputeMerkleRoot, raising a mutated flag that CheckBlock turns into a bad-txns-duplicate rejection. The affected verifier was introduced in 2.3.0 as Block.checkMerkleRoot(); later versions expose the same gate as Block.checkTxRoots(). The vendor fix (commit b79c7714c0687473dc6e25c69fc5fc597302c7a0, with type/API plumbing in 009f165edfbf925cad8964b2dce478d18dd19449) adds an optional mutated { value: boolean } output to fastMerkleRoot so an actual adjacent equal-hash pair is flagged, threads it through Block.calculateMerkleRoot, and makes __checkMerkleRoot return !mutated.value && rootMatches. Bitcoin Core's behavior is cited from its published source in the advisory rather than executed against a running node, and the library itself is a JavaScript/TypeScript package for Node.js and browsers, so exposure depends entirely on whether the embedding application uses the block-root path.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 9.3 CRITICAL
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
vuln.today AI 8.2 HIGH

Any P2P peer can relay a mutated block with no auth or mining (AV:N/AC:L/PR:N/UI:N); the forged transaction list breaks integrity (I:H) with a consumer-dependent DoS (A:L) and no real confidentiality loss (C:N).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
High
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
High
Subsequent system: Availability
High

Lifecycle Timeline

2
Patch available
Nov 04, 2026 - 20:18 EUVD
CVE Published
Nov 04, 2026 - 19:02 cve.org
CRITICAL 9.3

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 85 npm packages depend on bitcoinjs-lib (52 direct, 39 indirect)

Ecosystem-wide dependent count for version 2.3.0.

Technical POC Analysis

The bug is CWE-354: Improper Validation of Integrity Check Value.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A critical vulnerability in the widely used bitcoinjs-lib library allows attackers to craft malformed Bitcoin blocks that pass Merkle root validation, potentially causing financial losses and reputational damage for cryptocurrency exchanges, block explorers, and SPV wallet providers. Although no active exploitation has been confirmed, a public proof-of-concept exists, and organizations relying on this library for transaction verification are at risk of processing duplicate transactions or rejecting legitimate blocks, undermining trust in their services.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include: (1) avoid relying solely on the library's Merkle root validation for block acceptance; (2) implement additional checks to detect duplicate transactions in received blocks; (3) restrict peer connections to trusted nodes; (4) monitor for and alert on block hash blacklisting events; (5) disable SPV functionality if not essential until a patch is applied.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Medium
popular Bitcoin JS library, but exposure scoped to block-validation consumers
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy