Improperly Implemented Security Check for Standard Affecting @keep-network/tbtc-v2 package, versions <1.5.2


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-KEEPNETWORKTBTCV2-6182935
  • published21 Jan 2024
  • disclosed19 Jan 2024
  • creditUnknown

Introduced: 19 Jan 2024

CVE NOT AVAILABLE CWE-358  (opens in a new tab)

How to fix?

Upgrade @keep-network/tbtc-v2 to version 1.5.2 or higher.

Overview

Affected versions of this package are vulnerable to Improperly Implemented Security Check for Standard via the creation of a 64-byte transaction that is treated as a node in its Merkle proof. An attacker can produce seemingly valid SPV proofs for fraudulent transactions by publishing specially crafted transactions on the Bitcoin blockchain. This is only exploitable if the attacker calculates an unusual but valid transaction D, so that the last 32 bytes of D are a part of the Merkle proof of another transaction E, and then publishes D and waits for it to be mined. A valid SPV proof for D can then be transformed into a proof for E by prepending certain values to the Merkle proof and changing the transaction index to match E's implied position in the Merkle tree.

CVSS Base Scores

version 3.1