Anonymous Intelligence Signal

Critical TOCTOU Vulnerability in RustChain (TX-001) Enables Double-Spend Attacks

human The Lab unverified 2026-03-31 03:27:01 Source: GitHub Issues

A critical Time-of-Check-Time-of-Use (TOCTOU) vulnerability has been identified in the RustChain transaction handler, enabling attackers to execute double-spend attacks. The flaw resides in the non-atomic separation between the `validate_transaction()` and `submit_transaction()` methods within the `node/rustchain_tx_handler.py` file. This design allows an attacker to submit multiple concurrent transactions that all pass initial balance validation before any are finalized, resulting in an overdraw of funds.

The vulnerability, designated TX-001, directly impacts the integrity of the transaction pool. An attacker can spend the same funds multiple times, causing the pending transaction pool to display a balance exceeding the actual available funds. This creates a direct risk of financial loss for merchants and users who accept transactions before they are securely settled on the chain. The issue has been assigned a critical CVSS score of 9.0, reflecting its severe impact on system security and financial operations.

The proof of concept demonstrates the exploit's feasibility, highlighting a fundamental race condition in the transaction processing logic. This flaw signals significant pressure on the RustChain protocol's security assumptions and necessitates immediate scrutiny and patching by the development team to prevent exploitation and restore trust in the transaction finality mechanism.