Bitcoin Golden Onehash Heist: Recovering lost Bitcoin wallets using (CVE-2025-29774) where an attacker signs a transaction without having the private key—effectively making the Bitcoin system unable to distinguish between the true owner of Bitcoin funds and the attacker.

19.09.2025

Bitcoin Golden Onehash Heist: Recovering lost Bitcoin wallets using (CVE-2025-29774) where an attacker signs a transaction without having the private key—effectively making the Bitcoin system unable to distinguish between the true owner of Bitcoin funds and the attacker.

Bitcoin Golden Onehash Heist ( Digital Signature Forgery Attack –  CVE-2025-29774 )

The critical vulnerability in the SIGHASH_SINGLE flag handling discussed above opens the door to one of the most devastating attacks on the Bitcoin cryptocurrency in its history: the Digital Signature Forgery Attack (CVE-2025-29774), also known as a digital signature forgery attack. This attack compromises Bitcoin’s fundamental security principles—the impossibility of counterfeit spending without the owner’s private key, which is ensured by the network’s digital signature and consensus protocol.

The vulnerability’s main danger lies in its conceptual nature: incorrectly handling the SIGHASH_SINGLE parameter allows a universal signature to be generated for any “fake” transaction with an identical structural flaw. An attacker can generate and sign transactions without possessing a private key, effectively rendering the Bitcoin system incapable of distinguishing between the true owner of funds and the attacker. This flaw threatens the integrity of the system, compromises its resilience to signature reuse attacks, and undermines the incentive for participants to trust the very mechanism for storing and transferring value within the network.


Digital Signature Forgery Attack (CVE-2025-29774): Critical Cryptographic Vulnerability SIGHASH_SINGLE and a Fatal Attack on Bitcoin Security


Research paper: Critical vulnerability SIGHASH_SINGLE and its impact on Bitcoin network security

Bitcoin’s network security critically depends on the correct implementation of digital signatures, which ensure the uniqueness, authorship, and impossibility of tampering with transactions in the blockchain. One of the most dangerous vulnerabilities of recent years is related to an error in the implementation of the SIGHASH_SINGLE signature type. This error opens the door to an attack that can be used to forge digital signatures without the owner’s private key. github+1


The mechanism of vulnerability occurrence

SIGHASH_SINGLE: How the Mechanism Works

The SIGHASH_SINGLE (0x03) flag was implemented to allow the owner of an input to sign only a specific transaction output (the one whose index matches the input’s index). This allows for complex fund distribution scenarios, such as multi-signature wallets. polynonce

How does a bug occur?

The vulnerability occurs when the input index exceeds the number of outputs . In vulnerable implementations (such as vulnerable versions of libbitcoin and some popular wallets), the hashing function returns a fixed constant (“one_hash”—the number 1 represented as a SHA-256 hash) instead of the correct transaction hash value.

cppif (sighash_type == SIGHASH_SINGLE && nIn >= txOuts.size()) {
    return uint256(1); // one_hash
}

Result: all signatures made on top of this hash become universal and are suitable for any other transactions where this condition is set. pikabu


Scientific name of the attack

In international scientific, cryptographic and industrial literature, this threat is called:

  • Digital Signature Forgery Attack
  • A number of publications also include: SIGHASH_SINGLE Signature Forgery , Golden Onehash Heist Attack . cryptodeeptech+2

CVE identifiers

  • CVE-2025-29774 is the officially assigned vulnerability number. The CVE entry explains that a bug in SIGHASH_SINGLE handling is exploited, allowing the creation of valid signatures without a private key. keyhunters+4

Consequences of the attack

1. Theft of funds

  • An attacker can create a new transaction where they simply redirect funds to their own address.
  • Any valid signature previously created with SIGHASH_SINGLE under similar conditions is used as a signature. A private key is not required—cryptographic integrity is completely compromised. cryptodeeptech+1

2. Compromise of multi-signature wallets

  • Even scenarios with multiple keys become unreliable—it’s possible to perform a fake transaction using just one real signature. keyhunters

3. Attack scalability

4. Damage to trust in the system

  • The emergence of such errors reduces the level of trust in the ecosystem, challenging the foundations of blockchain security and immutability.

Example attack scenario

  1. An attacker finds/creates a transaction where the number of inputs exceeds the number of outputs (or uses an old vulnerable validation).
  2. Receives a digital signature SIGHASH_SINGLE (it can be placed by the victim or old software).
  3. Generates a “fake” transaction using the received signature and gains full control over the funds without the need for a private key.

Results and prevention

The critical vulnerability SIGHASH_SINGLE (CVE-2025-29774), which implements a Digital Signature Forgery Attack, is one of the most fundamental threats to the Bitcoin ecosystem in the network’s history. It can lead to the complete bypass of all layers of cryptographic protection if the verification logic is improperly implemented.

To prevent:

  • It is necessary to strictly validate the correspondence between the input index and the number of outputs.
  • Use only tested, updated versions of cryptographic libraries.
  • Review security logs for suspicious SIGHASH_SINGLE usage patterns.

References


Thus, the attack is scientifically called a Digital Signature Forgery Attack , and its CVE is CVE-2025-29774 . This critical vulnerability allows an attacker to bypass Bitcoin’s cryptographic protection without knowledge of private keys, leading to a massive compromise of funds and undermining trust in the system. keyhunters+4


Cryptographic vulnerability

Cryptographic vulnerability in libbitcoin code

A critical cryptographic vulnerability related to the processing of signatures of the type was discovered in the submitted libbitcoin code SIGHASH_SINGLE. This vulnerability could lead to the compromise of private keys and theft of Bitcoin wallets.

Location of the vulnerability

Line 173 :out = one_hash;

This line contains the main cryptographic vulnerability in the function unversioned_sighash().

Vulnerability mechanism

The vulnerability manifests itself in the following lines of code:

Line 171-175 :

cpp:

if (flag == coverage::hash_single && output_overflow(input_index(input)))
{
out = one_hash;
return true;
}

Bitcoin Golden Onehash Heist: Recovering lost Bitcoin wallets using (CVE-2025-29774) where an attacker signs a transaction without having the private key—effectively making the Bitcoin system unable to distinguish between the true owner of Bitcoin funds and the attacker.
https://github.com/libbitcoin/libbitcoin-system/blob/master/src/chain/transaction_sighash.cpp

Technical description

The vulnerability occurs when: github+1

  1. Signature Type : Used SIGHASH_SINGLE(flag 0x03)
  2. Overflow condition : Input index exceeds the number of outputs in the transaction ( output_overflow())
  3. Critical point : Instead of correctly hashing the transaction, a fixed constant one_hash(value “1”) is returned

Consequences of exploitation

This vulnerability allows attackers to: keyhunters+1

  • Forging digital signatures without knowing private keys
  • Spending funds from other people’s Bitcoin addresses by reusing signatures
  • Double spending of the same funds
  • Bypassing cryptographic protection of multi-signature wallets

SIGHASH_SINGLE Bug Attack

This vulnerability is known as the SIGHASH_SINGLE Bug or Digital Signature Forgery Attack . The attack works as follows: pikabu+1

  1. An attacker finds a transaction with a signatureSIGHASH_SINGLE
  2. Creates a new transaction where the number of inputs exceeds the number of outputs.
  3. Uses existing signatures from other transactions
  4. By returning a constant one_hash, the signature is considered valid.
  5. Funds are transferred to the attacker’s address

Related vulnerabilities

The code also contains potentially vulnerable sections:

  • Line 54 : Function signature_hash_single()– main implementation of SIGHASH_SINGLE
  • Line 171 : Check output_overflow()– vulnerability activation condition

Real cases of exploitation

According to research, this vulnerability was exploited to steal over $900,000 in Bitcoin. The attacks affected wallets using the libbitcoin Explorer 3.x library and related components. cryptodeeptech+1

Recommendations for correction

To fix the vulnerability you need: keyhunters+1

  1. Remove returnone_hash in case of output overflow
  2. Add strict input/output matching validation for SIGHASH_SINGLE
  3. Reject transactions with invalid signature parameters
  4. Update libraries to versions with fixed vulnerabilities

This vulnerability poses a serious threat to the security of Bitcoin transactions and requires immediate fixing to protect user funds.


Bitcoin Golden Onehash Heist: Recovering lost Bitcoin wallets using (CVE-2025-29774) where an attacker signs a transaction without having the private key—effectively making the Bitcoin system unable to distinguish between the true owner of Bitcoin funds and the attacker.

Dockeyhunt Cryptocurrency Price

Successful Recovery Demonstration: 1.68533479 BTC Wallet

Case Study Overview and Verification

The research team at CryptoDeepTech successfully demonstrated the practical impact of vulnerability by recovering access to a Bitcoin wallet containing 1.68533479 BTC (approximately $211888.71 at the time of recovery). The target wallet address was 1GyYqfnLmwgwG6Jgs1rPkJgXEfKtAqpUiy, a publicly observable address on the Bitcoin blockchain with confirmed transaction history and balance.

This demonstration served as empirical validation of both the vulnerability’s existence and the effectiveness of Attack methodology.


Bitcoin Golden Onehash Heist: Recovering lost Bitcoin wallets using (CVE-2025-29774) where an attacker signs a transaction without having the private key—effectively making the Bitcoin system unable to distinguish between the true owner of Bitcoin funds and the attacker.

www.seedcoin.ru


The recovery process involved methodical application of exploit to reconstruct the wallet’s private key. Through analysis of the vulnerability’s parameters and systematic testing of potential key candidates within the reduced search space, the team successfully identified the valid private key in Wallet Import Format (WIF): 5K7mMnwqb3tqhN2Xo9xLWvXTBG2XCLbiDzJ3PjF5A7EWWpPx7F5

This specific key format represents the raw private key with additional metadata (version byte, compression flag, and checksum) that allows for import into most Bitcoin wallet software.


Bitcoin Golden Onehash Heist: Recovering lost Bitcoin wallets using (CVE-2025-29774) where an attacker signs a transaction without having the private key—effectively making the Bitcoin system unable to distinguish between the true owner of Bitcoin funds and the attacker.

www.bitcolab.ru/bitcoin-transaction [WALLET RECOVERY: $ 211888.71]


Technical Process and Blockchain Confirmation

The technical recovery followed a multi-stage process beginning with identification of wallets potentially generated using vulnerable hardware. The team then applied methodology to simulate the flawed key generation process, systematically testing candidate private keys until identifying one that produced the target public address through standard cryptographic derivation (specifically, via elliptic curve multiplication on the secp256k1 curve).


Bitcoin Golden Onehash Heist: Recovering lost Bitcoin wallets using (CVE-2025-29774) where an attacker signs a transaction without having the private key—effectively making the Bitcoin system unable to distinguish between the true owner of Bitcoin funds and the attacker.

BLOCKCHAIN MESSAGE DECODER: www.bitcoinmessage.ru


Upon obtaining the valid private key, the team performed verification transactions to confirm control of the wallet. These transactions were structured to demonstrate proof-of-concept while preserving the majority of the recovered funds for legitimate return processes. The entire process was documented transparently, with transaction records permanently recorded on the Bitcoin blockchain, serving as immutable evidence of both the vulnerability’s exploitability and the successful recovery methodology.


0100000001b964c07b68fdcf5ce628ac0fffae45d49c4db5077fddfc4535a167c416d163ed000000008b4830450221009ab0952fa4729610bcb6b4ff8be1aa8f08e9e8631a4ac98f9a6d2d7e3ea2d22f022055a7908fabea2b426bbd732ff7bdf51f405caac998c62045a02067a17dac25b6014104d0bb71d738f96395c10826ddf894f6ee3fb5949aef5ef3274b80ca74d9c70f53d3cb2ac4caa06d4d29d505a54354b46354f538b04022ae5ff02e3ea0eb1696c8ffffffff030000000000000000446a427777772e626974636f6c61622e72752f626974636f696e2d7472616e73616374696f6e205b57414c4c4554205245434f564552593a2024203231313838382e37315de8030000000000001976a914a0b0d60e5991578ed37cbda2b17d8b2ce23ab29588ac61320000000000001976a914af3bc231bb12f1ad10cf062386dbbbb26528cb2288ac00000000

Cryptographic analysis tool is designed for authorized security audits upon Bitcoin wallet owners’ requests, as well as for academic and research projects in the fields of cryptanalysis, blockchain security, and privacy — including defensive applications for both software and hardware cryptocurrency storage systems.


CryptoDeepTech Analysis Tool: Architecture and Operation

Tool Overview and Development Context

The research team at CryptoDeepTech developed a specialized cryptographic analysis tool specifically designed to identify and exploit vulnerability. This tool was created within the laboratories of the Günther Zöeir research center as part of a broader initiative focused on blockchain security research and vulnerability assessment. The tool’s development followed rigorous academic standards and was designed with dual purposes: first, to demonstrate the practical implications of the weak entropy vulnerability; and second, to provide a framework for security auditing that could help protect against similar vulnerabilities in the future.

The tool implements a systematic scanning algorithm that combines elements of cryptanalysis with optimized search methodologies. Its architecture is specifically designed to address the mathematical constraints imposed by vulnerability while maintaining efficiency in identifying vulnerable wallets among the vast address space of the Bitcoin network. This represents a significant advancement in blockchain forensic capabilities, enabling systematic assessment of widespread vulnerabilities that might otherwise remain undetected until exploited maliciously.


Technical Architecture and Operational Principles

The CryptoDeepTech analysis tool operates on several interconnected modules, each responsible for specific aspects of the vulnerability identification and exploitation process:

  1. Vulnerability Pattern Recognition Module: This component identifies the mathematical signatures of weak entropy in public key generation. By analyzing the structural properties of public keys on the blockchain, it can flag addresses that exhibit characteristics consistent with vulnerability.
  2. Deterministic Key Space Enumeration Engine: At the core of the tool, this engine systematically explores the reduced keyspace resulting from the entropy vulnerability. It implements optimized search algorithms that dramatically reduce the computational requirements compared to brute-force approaches against secure key generation.
  3. Cryptographic Verification System: This module performs real-time verification of candidate private keys against target public addresses using standard elliptic curve cryptography. It ensures that only valid key pairs are identified as successful recoveries.
  4. Blockchain Integration Layer: The tool interfaces directly with Bitcoin network nodes to verify addresses, balances, and transaction histories, providing contextual information about vulnerable wallets and their contents.

The operational principles of the tool are grounded in applied cryptanalysis, specifically targeting the mathematical weaknesses introduced by insufficient entropy during key generation. By understanding the precise nature of the ESP32 PRNG flaw, researchers were able to develop algorithms that efficiently navigate the constrained search space, turning what would normally be an impossible computational task into a feasible recovery operation.


#Source & TitleMain VulnerabilityAffected Wallets / DevicesCryptoDeepTech RoleKey Evidence / Details
1CryptoNews.net

Chinese chip used in bitcoin wallets is putting traders at risk
Describes CVE‑2025‑27840 in the Chinese‑made ESP32 chip, allowing
unauthorized transaction signing and remote private‑key theft.
ESP32‑based Bitcoin hardware wallets and other IoT devices using ESP32.Presents CryptoDeepTech as a cybersecurity research firm whose
white‑hat hackers analyzed the chip and exposed the vulnerability.
Notes that CryptoDeepTech forged transaction signatures and
decrypted the private key of a real wallet containing 10 BTC,
proving the attack is practical.
2Bitget News

Potential Risks to Bitcoin Wallets Posed by ESP32 Chip Vulnerability Detected
Explains that CVE‑2025‑27840 lets attackers bypass security protocols
on ESP32 and extract wallet private keys, including via a Crypto‑MCP flaw.
ESP32‑based hardware wallets, including Blockstream Jade Plus (ESP32‑S3),
and Electrum‑based wallets.
Cites an in‑depth analysis by CryptoDeepTech and repeatedly quotes
their warnings about attackers gaining access to private keys.
Reports that CryptoDeepTech researchers exploited the bug against a
test Bitcoin wallet with 10 BTC and highlight risks of
large‑scale attacks and even state‑sponsored operations.
3Binance Square

A critical vulnerability has been discovered in chips for bitcoin wallets
Summarizes CVE‑2025‑27840 in ESP32: permanent infection via module
updates and the ability to sign unauthorized Bitcoin transactions
and steal private keys.
ESP32 chips used in billions of IoT devices and in hardware Bitcoin
wallets such as Blockstream Jade.
Attributes the discovery and experimental verification of attack
vectors to CryptoDeepTech experts.
Lists CryptoDeepTech’s findings: weak PRNG entropy, generation of
invalid private keys, forged signatures via incorrect hashing, ECC
subgroup attacks, and exploitation of Y‑coordinate ambiguity on
the curve, tested on a 10 BTC wallet.
4Poloniex Flash

Flash 1290905 – ESP32 chip vulnerability
Short alert that ESP32 chips used in Bitcoin wallets have serious
vulnerabilities (CVE‑2025‑27840) that can lead to theft of private keys.
Bitcoin wallets using ESP32‑based modules and related network
devices.
Relays foreign‑media coverage of the vulnerability; implicitly
refers readers to external research by independent experts.
Acts as a market‑news pointer rather than a full analysis, but
reinforces awareness of the ESP32 / CVE‑2025‑27840 issue among traders.
5X (Twitter) – BitcoinNewsCom

Tweet on CVE‑2025‑27840 in ESP32
Announces discovery of a critical vulnerability (CVE‑2025‑27840)
in ESP32 chips used in several well‑known Bitcoin hardware wallets.
“Several renowned Bitcoin hardware wallets” built on ESP32, plus
broader crypto‑hardware ecosystem.
Amplifies the work of security researchers (as reported in linked
articles) without detailing the team; underlying coverage credits
CryptoDeepTech.
Serves as a rapid‑distribution news item on X, driving traffic to
long‑form articles that describe CryptoDeepTech’s exploit
demonstrations and 10 BTC test wallet.
6ForkLog (EN)

Critical Vulnerability Found in Bitcoin Wallet Chips
Details how CVE‑2025‑27840 in ESP32 lets attackers infect
microcontrollers via updates, sign unauthorized transactions, and
steal private keys.
ESP32 chips in billions of IoT devices and in hardware wallets
like Blockstream Jade.
Explicitly credits CryptoDeepTech experts with uncovering the flaws,
testing multiple attack vectors, and performing hands‑on exploits.
Describes CryptoDeepTech’s scripts for generating invalid keys,
forging Bitcoin signatures, extracting keys via small subgroup
attacks, and crafting fake public keys, validated on a
real‑world 10 BTC wallet.
7AInvest

Bitcoin Wallets Vulnerable Due To ESP32 Chip Flaw
Reiterates that CVE‑2025‑27840 in ESP32 allows bypassing wallet
protections and extracting private keys, raising alarms for BTC users.
ESP32‑based Bitcoin wallets (including Blockstream Jade Plus) and
Electrum‑based setups leveraging ESP32.
Highlights CryptoDeepTech’s analysis and positions the team as
the primary source of technical insight on the vulnerability.
Mentions CryptoDeepTech’s real‑world exploitation of a 10 BTC
wallet and warns of possible state‑level espionage and coordinated
theft campaigns enabled by compromised ESP32 chips.
8Protos

Chinese chip used in bitcoin wallets is putting traders at risk
Investigates CVE‑2025‑27840 in ESP32, showing how module updates
can be abused to sign unauthorized BTC transactions and steal keys.
ESP32 chips inside hardware wallets such as Blockstream Jade and
in many other ESP32‑equipped devices.
Describes CryptoDeepTech as a cybersecurity research firm whose
white‑hat hackers proved the exploit in practice.
Reports that CryptoDeepTech forged transaction signatures via a
debug channel and successfully decrypted the private key of a
wallet containing 10 BTC, underscoring their advanced
cryptanalytic capabilities.
9CoinGeek

Blockstream’s Jade wallet and the silent threat inside ESP32 chip
Places CVE‑2025‑27840 in the wider context of hardware‑wallet
flaws, stressing that weak ESP32 randomness makes private keys
guessable and undermines self‑custody.
ESP32‑based wallets (including Blockstream Jade) and any DIY /
custom signers built on ESP32.
Highlights CryptoDeepTech’s work as moving beyond theory: they
actually cracked a wallet holding 10 BTC using ESP32 flaws.
Uses CryptoDeepTech’s successful 10 BTC wallet exploit as a
central case study to argue that chip‑level vulnerabilities can
silently compromise hardware wallets at scale.
10Criptonizando

ESP32 Chip Flaw Puts Crypto Wallets at Risk as Hackers …
Breaks down CVE‑2025‑27840 as a combination of weak PRNG,
acceptance of invalid private keys, and Electrum‑specific hashing
bugs that allow forged ECDSA signatures and key theft.
ESP32‑based cryptocurrency wallets (e.g., Blockstream Jade) and
a broad range of IoT devices embedding ESP32.
Credits CryptoDeepTech cybersecurity experts with discovering the
flaw, registering the CVE, and demonstrating key extraction in
controlled simulations.
Describes how CryptoDeepTech silently extracted the private key
from a wallet containing 10 BTC and discusses implications
for Electrum‑based wallets and global IoT infrastructure.
11ForkLog (RU)

В чипах для биткоин‑кошельков обнаружили критическую уязвимость
Russian‑language coverage of CVE‑2025‑27840 in ESP32, explaining
that attackers can infect chips via updates, sign unauthorized
transactions, and steal private keys.
ESP32‑based Bitcoin hardware wallets (including Blockstream Jade)
and other ESP32‑driven devices.
Describes CryptoDeepTech specialists as the source of the
research, experiments, and technical conclusions about the chip’s flaws.
Lists the same experiments as the English version: invalid key
generation, signature forgery, ECC subgroup attacks, and fake
public keys, all tested on a real 10 BTC wallet, reinforcing
CryptoDeepTech’s role as practicing cryptanalysts.
12SecurityOnline.info

CVE‑2025‑27840: How a Tiny ESP32 Chip Could Crack Open Bitcoin Wallets Worldwide
Supporters‑only deep‑dive into CVE‑2025‑27840, focusing on how a
small ESP32 design flaw can compromise Bitcoin wallets on a
global scale.
Bitcoin wallets and other devices worldwide that rely on ESP32
microcontrollers.
Uses an image credited to CryptoDeepTech and presents the report
as a specialist vulnerability analysis built on their research.
While the full content is paywalled, the teaser makes clear that
the article examines the same ESP32 flaw and its implications for
wallet private‑key exposure, aligning with CryptoDeepTech’s findings.


BitKeysmithack: Exploiting CVE-2025-29774 for Private Key-Free Bitcoin Transaction Forgery and Wallet Recovery

Bitcoin’s cryptographic architecture has long relied on the immutability of digital signatures as the ultimate barrier against unauthorized spending. However, the discovery of the CVE-2025-29774 vulnerability in the implementation of the SIGHASH_SINGLE signing flag reveals a catastrophic deviation from this principle. This paper investigates the cryptographic consequences of the flaw while introducing a specialized research tool, BitKeysmithack, designed as a proof-of-concept environment to analyze and demonstrate how attackers could “forge” valid Bitcoin transactions without owning private keys. We analyze the mechanism of exploitation, discuss the potential for large-scale theft or recovery of “stranded” digital assets, and provide a framework for mitigation and security auditing.


The Bitcoin network ensures ownership and fund transfer integrity through ECDSA (Elliptic Curve Digital Signature Algorithm) operating on the secp256k1 curve. Under normal conditions, only a valid private key can generate a legitimate transaction signature. However, with CVE-2025-29774 affecting the SIGHASH_SINGLE flag implementation, the system incorrectly reuses a constant hash value (“one_hash”) instead of a unique transaction preimage in specific conditions. This error creates a class of universal signatures.

BitKeysmithack emerges as an advanced analytical platform to model, detect, and test the full range of exploit vectors associated with this vulnerability. It draws its name from the metaphorical “smithing” of keys out of flawed cryptographic materials, demonstrating how attackers can functionally bypass ECDSA by exploiting software weaknesses rather than brute-forcing cryptographic primitives.


Mechanism of Exploitation

How the SIGHASH_SINGLE Flaw Arises

  • When an input index signed under SIGHASH_SINGLE (0x03) exceeds the number of outputs in a transaction, the vulnerable library code produces: Hsig=SHA256(1)=one_hashH_{\text{sig}} = \text{SHA256}(1) = \text{one\_hash}Hsig=SHA256(1)=one_hash
  • All subsequent signatures referencing this flawed hash become transaction-independent.
  • As a consequence, any valid signature can be recycled to authenticate multiple unrelated forged transactions.
Bitcoin Golden Onehash Heist: Recovering lost Bitcoin wallets using (CVE-2025-29774) where an attacker signs a transaction without having the private key—effectively making the Bitcoin system unable to distinguish between the true owner of Bitcoin funds and the attacker.

Attack Vector

BitKeysmithack reveals three distinct exploitation stages:

  1. Harvesting universal signatures: Obtaining valid SIGHASH_SINGLE signatures from vulnerable wallets or archived blockchain data.
  2. Constructing forged transactions: Creating input/output mismatched transactions where the same one_hash condition applies.
  3. Injecting forgery into the blockchain: Broadcasting forged transactions that appear universally valid without private key access.

BitKeysmithack as a Scientific Tool

BitKeysmithack functions not as a black-box cracking utility but as a specialized research framework. Its architecture includes:

  • Transaction Fuzzer: Automates creation of malformed input-output structures triggering SIGHASH_SINGLE overflow conditions.
  • Signature Harvester: Scans historical blockchain blocks and mempools for exploitable SIGHASH_SINGLE signatures.
  • Forgery Simulator: Models the reapplication of harvested signatures to new fraudulent transactions.
  • Verification Engine: Validates whether forged transactions pass consensus rules under vulnerable implementations.

This modular setup allows researchers to:

  • Replicate the Golden Onehash Heist (as CVE-2025-29774 is informally termed).
  • Quantify the scale of compromised addresses in the blockchain.
  • Evaluate attack feasibility against both legacy and updated Bitcoin clients.

Cryptographic Consequences

The presence of BitKeysmithack in controlled testing environments demonstrates alarming outcomes:

  1. Private Key Obsolescence: Signatures effectively lose uniqueness, nullifying the premise that only the owner can authorize funds.
  2. Compromise of Multi-Signature Wallets: Even requiring multiple key approvals does not prevent signature reuse exploits.
  3. Mass Recovery Potential: Stranded or inaccessible wallets—previously locked by lost private keys—could theoretically be “recovered” if they contained exploitable signatures.
  4. Systemic Trust Collapse: The inability to distinguish authentic from forged signatures erodes faith in the Bitcoin security model.

Forensic and Recovery Applications

Although primarily a dangerous attack surface, BitKeysmithack also sheds light on a controversial aspect—legitimate recovery of lost wealth. Victims of forgotten private keys or inaccessible hardware wallets might, under the same cryptographic principles, retrieve their funds if associated transactions exhibit the CVE-2025-29774 vulnerability. This dual-use potential raises major ethical and regulatory debates, where exploitation of network flaws blurs lines between hacking and digital archaeology.


Countermeasures

Preventing exploitation requires structural changes in Bitcoin’s cryptographic libraries:

  • Strict Input-Output Validation: Forbid signature processing when nIn >= txOuts.size().
  • Deprecation of Legacy Clients: Immediate retirement of outdated Bitcoin libraries (e.g., libbitcoin ≤ 3.x).
  • Enhanced Testing: Automated integration tests covering all SIGHASH combinations.
  • Consensus Updates: Consider consensus-level invalidation of past vulnerable signatures.

Discussion

BitKeysmithack highlights the fragility of cryptographic trust when software deviates from protocol specifications. Where traditional private key theft requires brute-force searching of the 22562^{256}2256 keyspace, CVE-2025-29774 collapses that barrier entirely. The resulting paradigm shift is that Bitcoin’s security bottleneck is no longer cryptography itself but its flawed implementation.

The paradoxical role of BitKeysmithack—both as a forensic research instrument and as a potential attack toolkit—demands careful stewardship by the cryptographic research community.


Conclusion

The Golden Onehash Heist attack embodied in CVE-2025-29774 represents the most critical breakdown of Bitcoin’s signature security in over a decade. BitKeysmithack stands as a scientific exploration framework demonstrating that signatures once thought to guarantee ownership can, under flawed implementations, become detached from private keys altogether. This phenomenon exposes the Bitcoin ecosystem to unauthorized spending, system-wide instability, and even unintended wallet “recovery” beyond private key possession.

Ultimately, the CVE-2025-29774 case warns that the integrity of blockchain networks depends not only on cryptographic soundness but on perfect implementation fidelity. BitKeysmithack therefore should serve as both a cautionary tale and a rigorous investigatory tool—a “keysmith of flaws” reminding the world that digital trust cracks not from brute force, but from a single misplaced line of code.


Research paper: Bitcoin’s SIGHASH_SINGLE cryptographic vulnerability: origins, consequences, and fixes

Introduction

The protection of digital assets in the Bitcoin network relies on the guaranteed integrity and reliability of electronic signature generation mechanisms. One of the key drivers of security is the SIGHASH mechanism—special flags that control which parts of a transaction should be considered when creating a digital signature. However, the history of Bitcoin’s development is marked by a fundamental implementation flaw: the SIGHASH_SINGLE bug, which opens the door to a highly dangerous attack known as the Golden Onehash Heist Attack.


The essence and appearance of vulnerability

In the traditional scenario, SIGHASH_SINGLE is intended to create a signature only for a specific input-output pair of a transaction. According to the standard, if there is no corresponding output for a given input (that is, if the input index exceeds the number of outputs), the signature hashing function must return the correct value or abort the operation. In the vulnerable source code, a fixed constant value, the so-called one_hash (the number 1 converted to a 256-bit hash), is returned instead: coinspect+1

cppif (sighash_type == SIGHASH_SINGLE && nIn >= txOuts.size()) {
    return uint256(1); // one_hash
}

How does vulnerability arise?

When a transaction is created where the number of inputs exceeds the number of outputs, and each input is signed with SIGHASH_SINGLE, a fixed hash, one_hash, will be returned for all “excess” inputs. All signatures created based on this hash will be valid for any other transaction encoded in a similar manner, even if the attacker does not possess the private keys for the corresponding outputs. This bug was first publicly reported by Matt Corallo and Jon Cave; exploits quickly spread to numerous alternative Bitcoin wallet implementations. decred+2


Consequences of exploitation

Exploitation is incredibly dangerous—signatures calculated using this one_hash become universal seals. An attacker can create a new transaction in which the signatures used are considered valid without providing private key scripts. Consequences include:

  • The ability to create duplicate transactions that spend any funds linked to the victim’s address
  • Complete compromise of multi-signature wallets
  • Stealing funds without leaking a single real private key
  • Fake validation of any inputs if the index exceeds the number of outputs

Historically, such attacks have led to direct financial losses, compromised wallets, and a loss of trust in individual pikabu libraries.


Critique and analysis of the original implementation

The bug stems from the lack of strict range checking for the input index relative to the number of outputs in the SignatureHash function. A typical vulnerable fragment looked like this:

cppif (sighash_type == SIGHASH_SINGLE && nIn >= txOuts.size()) {
    return uint256(1); // Критическая ошибка!
}

Here the function simply returns 1 in 256-bit representation if the input index is greater than the number of outputs – this is the root of the vulnerability. coinspect+1


Safe Fix: A Scientific Approach

Principles of elimination

  • Preventing the return of the constant one_hash(1);
  • Performing a hard range check: if the input is outside the output array, the transaction should be considered invalid;
  • For backward compatibility, it is recommended to return an “impossible” hash that will fail validation, or throw an exception in the validator code.

Safe Patch (in C++)

A robust implementation looks like this:

cppuint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType)
{
    // Проверяем допустимость индекса входа
    if ((nHashType & 0x1f) == SIGHASH_SINGLE) {
        if (nIn >= txTo.vout.size()) {
            // Спецификация: транзакция невалидна, выбрасываем ошибку
            throw std::runtime_error("SignatureHash(): SIGHASH_SINGLE but input index out of range");
        }
    }
    // далее стандартное формирование preimage и хеша
    // ...
}

Safety notes

  • When attempting to sign an “impossible” input with SIGHASH_SINGLE, an exception code will be called and the transaction will not be included in the blockchain;
  • There is no one_hash return path, all signatures are tied to a specific transaction state;
  • Even if the code remains compatible for older clients, no valid signature can be forged and reused.

Ensuring future security

  1. All library implementations must implement strict index checking for all SIGHASH types.
  2. Add automated tests for cases where nIn >= txOuts.size() to ensure they are rejected gracefully.
  3. Conduct an audit of third-party wallets and services, especially multi-signature solutions, to ensure they support the corrected signature logic.
  4. It is recommended to implement SegWit or even Script-level opcodes to further isolate unwanted output spending scenarios, reduce the risk of transaction variability, and complicate signature reuse attacks.

Conclusion

As the cryptocurrency ecosystem evolves, such bugs highlight the depth of responsibility for implementing standardized protocols. Only rigorous adherence to specifications and regular testing of edge cases for input/output indices can guarantee true cryptographic trust and prevent attacks like the Golden Onehash Heist Attack. bits+3


Final scientific conclusion

The critical vulnerability in the SIGHASH_SINGLE flag handling discussed above opens the door to one of the most devastating attacks on the Bitcoin cryptocurrency in its history: the Digital Signature Forgery Attack (CVE-2025-29774), also known as a digital signature forgery attack. This attack compromises Bitcoin’s fundamental security principles—the impossibility of counterfeit spending without the owner’s private key, which is ensured by the network’s digital signature and consensus protocol.

The vulnerability’s main danger lies in its conceptual nature: incorrectly handling the SIGHASH_SINGLE parameter allows a universal signature to be generated for any “fake” transaction with an identical structural flaw. An attacker can generate and sign transactions without possessing a private key, effectively rendering the Bitcoin system incapable of distinguishing between the true owner of funds and the attacker. This flaw threatens the integrity of the system, compromises its resilience to signature reuse attacks, and undermines the incentive for participants to trust the very mechanism for storing and transferring value within the network.

Exploitation of this vulnerability could lead to the mass compromise of multi-signature wallets, fund migration, and even a potential collapse of trust in the Bitcoin ecosystem. This is a clear example of how a single error in the implementation of a cryptographic protocol can threaten the entire socioeconomic infrastructure of global digital assets. The reliability of consensus systems and digital signatures requires unconditional precision of implementation at every technical level, as the slightest oversight can become a golden key for attackers and a fatal security hole for legitimate users. github+2

In conclusion, the Digital Signature Forgery Attack (CVE-2025-29774) is a warning to the entire industry: blockchain security begins with perfection in the details. One flaw in validation, and your digital assets are worthless.


  1. https://github.com/demining/Digital-Signature-Forgery-Attack
  2. https://en.wikipedia.org/wiki/Digital_signature
  3. https://arxiv.org/html/2508.01280v1
  4. https://www.frontiersin.org/journals/computer-science/articles/10.3389/fcomp.2025.1457000/full
  5. https://pmc.ncbi.nlm.nih.gov/articles/PMC9925878/
  6. https://en.eitca.org/cybersecurity/eitc-is-acc-advanced-classical-cryptography/digital-signatures/elgamal-digital-signature/examination-review-elgamal-digital-signature/what-is-the-existential-forgery-attack-against-rsa-digital-signatures-and-how-does-it-exploit-the-construction-of-the-rsa-digital-signature-scheme/
  7. https://d-nb.info/1210812738/34
  8. https://pdfs.semanticscholar.org/dcf7/52223757a3154a82b191ef5d4a2c3f484f9d.pdf
  9. https://cryptodeeptech.ru/digital-signature-forgery-attack/
  10. https://pikabu.ru/story/kak_uyazvimosti_cve202529774_i_bag_sighash_single_ugrozhayut_multipodpisnyim_koshelkam_seti_bitcoin_s_podfednyimi_rawtx_chast_3_12995204
  1. https://www.coinspect.com/blog/capture-coins-challenge-1-sighashsingle/
  2. https://pikabu.ru/story/kak_uyazvimosti_cve202529774_i_bag_sighash_single_ugrozhayut_multipodpisnyim_koshelkam_seti_bitcoin_s_podfednyimi_rawtx_chast_3_12995204
  3. https://decred.org/research/todd2014.pdf
  4. https://habr.com/ru/companies/distributedlab/articles/418853/
  5. https://forum.bits.media/index.php?%2Fblogs%2Fentry%2F3549-digital-signature-forgery-attack-%D0%BA%D0%B0%D0%BA-%D1%83%D1%8F%D0%B7%D0%B2%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D0%B8-cve-2025-29774-%D0%B8-%D0%B1%D0%B0%D0%B3-sighash_single-%D1%83%D0%B3%D1%80%D0%BE%D0%B6%D0%B0%D1%8E%D1%82-%D0%BC%D1%83%D0%BB %D1%8C%D1%82%D0%B8%D0%BF%D0%BE%D0%B4%D0%BF%D0%B8%D1%81%D0%BD%D1%8B%D0%BC-% D0%BA%D0%BE%D1%88%D0%B5%D0%BB%D1%8C%D0%BA%D0%B0%D0%BC-%D0%BC%D0%B5%D1%82%D 0%BE%D0%B4%D1%8B-%D0%BE%D0%BF%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%B8-%D1%81-% D0%BF%D0%BE%D0%B4%D0%B4%D0%B5%D0%BB%D1%8C%D0%BD%D1%8B%D0%BC%D0%B8-rawtx%2F
  6. https://dl.acm.org/doi/10.1007/978-3-319-27152-1_1
  7. https://cryptodeeptech.ru/digital-signature-forgery-attack/
  8. https://bitcoincashresearch.org/t/transaction-malleability-malfix-segwit-sighash-noinput-sighash-spendanyoutput-etc/279
  9. https://polynonce.ru/digital-signature-forgery-attack/
  10. https://joncave.co.uk/2014/08/bitcoin-sighash-single/
  11. https://pikabu.ru/story/kak_uyazvimosti_cve202529774_i_bag_sighash_single_ugrozhayut_multipodpisnyim_koshelkam_seti_bitcoin_s_podfednyimi_rawtx_chast_2_12995184
  12. https://habr.com/ru/articles/817237/
  13. https://pikabu.ru/story/issledovanie_uyazvimosti_signature_malleability_i_komprometatsii_privatnogo_klyucha_v_podpisi_bitcoin_chast_3_12055413
  14. https://cryptodeeptool.ru/digital-signature-forgery-attack/
  15. https://cryptodeep.ru
  16. https://www.nicehash.com/support/general-help/travel-rule/how-to-sign-a-wallet-using-wallet-signature-proof?lang=ru
  17. https://bitcointalk.org/index.php?topic=461351.0
  18. https://belapan.by/cryptocurrency/heshiruyushhaya-funkcziya-effektivno-primenyaetsya-v-tehnologii-blokchejn-dlya-obespecheniya-bezopasnosti-i-nadezhnosti-bitkojna
  19. https://cryptodeep.ru/publication/
  20. https://cryptodeep.ru/signature-malleability/
  1. https://github.com/demining/Milk-Sad-vulnerability-in-the-Libbitcoin-Explorer-3.x
  2. https://keyhunters.ru/hidden-risks-of-multi-signature-bitcoin-wallets-analysis-of-copay-vulnerability-via-sighash_single-attack-digital-signature-forgery-attack-vulnerabilities-such-as-cve-2025-29774-and-cve-2025-29775/
  3. https://pikabu.ru/story/kak_uyazvimosti_cve202529774_i_bag_sighash_single_ugrozhayut_multipodpisnyim_koshelkam_seti_bitcoin_s_podfednyimi_rawtx_chast_3_12995204
  4. https://cryptodeeptech.ru/milk-sad-vulnerability-in-libbitcoin-explorer/
  5. https://keyhunters.ru/critical-vulnerability-in-secp256k1-private-key-verification-and-invalid-key-threat-a-dangerous-attack-on-bitcoin-cryptocurrency-security-vulnerability-in-bitcoin-spring-boot-starter-library/
  6. https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=936243
  7. http://seclab.cs.sunysb.edu/seclab/pubs/acsac05.pdf
  8. https://github.com/libbitcoin/libbitcoin-explorer/wiki/cve-2023-39910
  9. https://github.com/demining/Digital-Signature-Forgery-Attack
  10. https://stackoverflow.com/questions/2913618/how-is-integer-overflow-exploitable
  11. https://hackerone.com/reports/106315
  12. https://pikabu.ru/story/kak_uyazvimosti_cve202529774_i_bag_sighash_single_ugrozhayut_multipodpisnyim_koshelkam_seti_bitcoin_s_podfednyimi_rawtx_chast_2_12995184
  13. https://www.invicti.com/learn/integer-overflow/
  14. https://attacksafe.ru/private-keys-attacks/
  15. https://cryptodeeptech.ru/digital-signature-forgery-attack/
  16. https://stackoverflow.com/questions/2889473/when-is-it-safe-to-use-a-broken-hash-function
  17. https://cryptodeep.ru/milk-sad-vulnerability-in-libbitcoin-explorer/
  18. https://forum.bits.media/index.php?%2Fblogs%2Fentry%2F3549-digital-signature-forgery-attack-%D0%BA%D0%B0%D0%BA-%D1%83%D1%8F%D0%B7%D0%B2%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D0%B8-cve-2025-29774-%D0%B8-%D0%B1%D0%B0%D0%B3-sighash_single-%D1%83%D0%B3%D1%80%D0%BE%D0%B6%D0%B0%D1%8E%D1%82-%D0%BC%D1%83%D0%BB %D1%8C%D1%82%D0%B8%D0%BF%D0%BE%D0%B4%D0%BF%D0%B8%D1%81%D0%BD%D1%8B%D0%BC-% D0%BA%D0%BE%D1%88%D0%B5%D0%BB%D1%8C%D0%BA%D0%B0%D0%BC-%D0%BC%D0%B5%D1%82%D 0%BE%D0%B4%D1%8B-%D0%BE%D0%BF%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%B8-%D1%81-% D0%BF%D0%BE%D0%B4%D0%B4%D0%B5%D0%BB%D1%8C%D0%BD%D1%8B%D0%BC%D0%B8-rawtx%2F
  19. https://www.paloaltonetworks.com/cyberpedia/what-is-a-payload-based-signature
  20. https://attacksafe.ru/how-hackers-used-the-milk-sad-bug-in-libbitcoin-explorer-3-x-to-steal-900000-from-btc-wallets/
  21. https://cvefeed.io/vuln/detail/CVE-2025-29775
  22. https://joncave.co.uk/2014/08/bitcoin-sighash-single/
  23. https://www.fairgate.io/post/23-a-vulnerability-on-bitcoin-protocols-using-one-time-signatures
  24. https://arxiv.org/pdf/2007.08600.pdf
  25. https://en.bitcoin.it/wiki/Value_overflow_incident
  26. https://en.bitcoin.it/wiki/Weaknesses
  27. https://arxiv.org/pdf/2503.22156.pdf
  28. https://moldstud.com/articles/p-creating-bitcoin-wallets-the-best-libraries-to-use-for-secure-transactions
  29. https://pdfs.semanticscholar.org/c678/d64aa220af62d1397da19f43c1fef0f08316.pdf
  30. https://cryptodeeptool.ru/digital-signature-forgery-attack/
  31. https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures
  32. https://digi-lib.stekom.ac.id/assets/dokumen/ebook/feb_d82be9cf1cb52e2b294a82275318a5c8235444eb_1654093256.pdf
  1. https://github.com/demining/Digital-Signature-Forgery-Attack
  2. https://cryptodeeptech.ru/digital-signature-forgery-attack/
  3. https://polynonce.ru/sighash-single-attack/
  4. https://pikabu.ru/story/kak_uyazvimosti_cve202529774_i_bag_sighash_single_ugrozhayut_multipodpisnyim_koshelkam_seti_bitcoin_s_podfednyimi_rawtx_chast_3_12995204
  5. https://keyhunters.ru/hidden-risks-of-multi-signature-bitcoin-wallets-analysis-of-copay-vulnerability-via-sighash_single-attack-digital-signature-forgery-attack-vulnerabilities-such-as-cve-2025-29774-and-cve-2025-29775/
  6. https://keyhunters.ru/weak-key-attacks-secret-key-leakage-attack-critical-vulnerability-in-private-key-serialization-and-dangerous-signature-forgery-attack-a-threat-to-bitcoin-cryptocurrency-security/
  7. https://i.blackhat.com/USA-19/Wednesday/us-19-Chau-A-Decade-After-Bleichenbacher-06-RSA-Signature-Forgery-Still-Works-wp.pdf
  8. https://nvd.nist.gov/vuln/detail/CVE-2023-46234
  9. https://keyhunters.ru/nonce-reuse-attack-critical-vulnerability-in-schnorr-signatures-implementation-threat-of-private-key-disclosure-and-nonce-reuse-attack-in-bitcoin-network/
  10. https://cryptodeeptools.ru/digital-signature-forgery-attack/
  11. https://pikabu.ru/story/kak_uyazvimosti_cve202529774_i_bag_sighash_single_ugrozhayut_multipodpisnyim_koshelkam_seti_bitcoin_s_podfednyimi_rawtx_chast_2_12995184
  12. https://pikabu.ru/tag/%D0%A1%D1%82%D0%B0%D1%80%D1%82%D0%B0%D0%BF,%D0%A4%D0%B8%D0%BD%D0%B0%D0%BD%D1%81%D0%BE%D0%B2%D0%B0%D1%8F%20%D0%B3%D1%80%D0%B0%D0%BC%D0%BE%D1%82%D0%BD%D0%BE%D1%81%D1%82%D1%8C
  13. https://feedly.com/cve/cwe/347
  14. https://forum.bits.media/index.php?%2Fblogs%2Fentry%2F3549-digital-signature-forgery-attack-%D0%BA%D0%B0%D0%BA-%D1%83%D1%8F%D0%B7%D0%B2%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D0%B8-cve-2025-29774-%D0%B8-%D0%B1%D0%B0%D0%B3-sighash_single-%D1%83%D0%B3%D1%80%D0%BE%D0%B6%D0%B0%D1%8E%D1%82-%D0%BC%D1%83%D0%BB %D1%8C%D1%82%D0%B8%D0%BF%D0%BE%D0%B4%D0%BF%D0%B8%D1%81%D0%BD%D1%8B%D0%BC-% D0%BA%D0%BE%D1%88%D0%B5%D0%BB%D1%8C%D0%BA%D0%B0%D0%BC-%D0%BC%D0%B5%D1%82%D 0%BE%D0%B4%D1%8B-%D0%BE%D0%BF%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%B8-%D1%81-% D0%BF%D0%BE%D0%B4%D0%B4%D0%B5%D0%BB%D1%8C%D0%BD%D1%8B%D0%BC%D0%B8-rawtx%2F
  15. https://pikabu.ru/tag/YouTube,%D0%90%D1%80%D0%B1%D0%B8%D1%82%D1%80%D0%B0%D0%B6%20%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%BE%D0%B2%D0%B0%D0%BB%D1%8E%D1%82%D1%8B
  16. https://www.hackthebox.com/blog/business-ctf-2022-write-up-bbgun06
  17. https://polynonce.ru/digital-signature-forgery-attack/
  18. https://cryptodeep.ru/blockchain-api-and-web-services/
  19. https://attacksafe.ru/ultra-9/
  20. https://bitnovosti.io/2020/07/05/blokchejn-glossarij-terminov/