Junglewise Threat Intelligence

Keep Network tbtc-v2 protocol insolvency in deposit validation

Severity: low · CVSS 3.1 · Published 2026-03-02

Vendors: npm.

Executive brief

Keep Network's tbtc-v2 is a bridge protocol that allows users to deposit Bitcoin and mint wrapped tokens on Ethereum. A flaw in the deposit validation logic allows attackers to embed a valid P2SH script inside a P2PKH deposit, bypassing security checks. While this does not directly steal funds, it can trick the optimistic minting bot into minting tokens without proper validation, potentially causing the protocol to become insolvent (liabilities exceed reserves).

Technical details

The vulnerability exists in the Deposit library's validation logic for Bitcoin deposits. P2PKH and P2SH scripts both use 20-byte output scripts, but the contract protects against P2PKH deposits by manually assembling and comparing hashes. However, the bitcoin-spv library incorrectly extracts a P2SH script when it is embedded inside a P2PKH output, treating it as valid. The optimistic minting bot, which assumes successful Bitcoin transaction revelation implies validity, can be tricked into minting tokens. The attack requires network access to submit crafted Bitcoin transactions and achieve acceptance by the off-chain bot. The vulnerability was patched in version 1.8.2 with corrected deposit validation in the Bridge smart contract.

Affected products

  • Keep Network tbtc-v2 <= 1.8.1

Timeline

  • 2026-03-02: disclosed
  • 2026-03-02: patched: Version 1.8.2 fixes the deposit validation logic

References

Related threats