Skip to content

[SECURITY] Unsigned attestation path grants full mining rewards without wallet ownership proof #8178

Description

@leanworld7-netizen

Finding

Location: rustchain_v2_integrated_v2.2.1_rip200.py L5039-5042, L5306-5395

Issue: The /attest/submit endpoint accepts unsigned attestations for backward compatibility. When sig_hex and pubkey_hex are empty strings, the signature verification block is entirely skipped (L5039: # still accept *unsigned* attestations via the backward-compat). The attestation proceeds through nonce validation, hardware fingerprint checks, and is stored in miner_attest_recent (L5317). The miner is then auto-enrolled in epoch_enroll with full reward weight (L5392-5395).

For non-x86 miners (ARM, PowerPC, etc.), measurement_report_verified=False (L5366) only affects x86 vintage tier classification via _derive_enroll_weight_device (L2943). Non-x86 miners receive full hardware weight regardless of measurement_report_verified.

Impact: An attacker with valid hardware can submit attestations for ANY wallet address without proving they control that wallet's private key. While rewards go to the specified wallet (not directly stealable), this means:

  1. An attacker can enroll arbitrary wallets in mining without their owners' consent
  2. Mining farms can run unsigned miners at scale, bypassing the enrollment signature gate
  3. The canonical_payload_verified flag (L5366) is not checked for non-x86 reward eligibility

Exploit Steps:

  1. POST /attest/challenge with {"miner_id": "any_wallet_address"} → get nonce
  2. POST /attest/submit with the nonce, empty signature and public_key, and valid hardware fingerprint data
  3. Server stores attestation and auto-enrolls the wallet in current epoch with full reward weight

Fix: Require signature verification for all new attestations. The unsigned backward-compat path should be deprecated or restricted to a whitelist of legacy miners.


Wallet: leanworld7
Severity: MEDIUM
References: bounty #1102

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions