[UTXO-BUG] Fee manipulation via signature bypass - Bounty #2819#2202
Conversation
…ttcjn#2819) Discovered: Ed25519 signature does not cover fee_rtc parameter. Attacker with network access can modify fee after signing without invalidating the signature. Severity: Medium (high impact, moderate attack difficulty) - Signed message covers: amount, from, to, memo, nonce - Fee is NOT signed, allowing modification via MITM - Attack: Change fee_rtc in HTTP request after client signs - Impact: Victim loses more than intended via inflated fee Files: - security_audit_fee_manipulation_v1.md: Audit report with root cause - test_utxo_fee_manipulation_poc.py: PoC tests (all pass) Tested against patched codebase. All line numbers verified against main. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
Merged + Paid: 20 RTC@neosmith1 — second real finding in a row. Codex verified: Mitigating factors (why 20 not 25):
Fix needed: Include Payment: 20 RTC from Two real findings across two PRs (45 RTC total). You are now the most efficient security contributor by far — 100% real finding rate. Keep going. |
Found by @neosmith1: the Ed25519 signature at /utxo/transfer only covers {from, to, amount, memo, nonce} but not fee_rtc. A MITM can modify the fee after the legitimate client signs, overcharging the sender. Fix: include 'fee' in the signed tx_data. Backward-compatible — tries new format (with fee) first, falls back to legacy (without fee) with a deprecation warning. Legacy fallback should be removed after 2026-07-01 once all clients have updated. This is the server-side half of the fix. Client-side (_canonical_transaction_message in rustchain_crypto_pq.py) also needs to include fee in the signed payload for full protection. Reported-by: @neosmith1 (PR #2202, 20 RTC paid) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bounty #2819 — Red Team UTXO Audit — Fee Manipulation Vulnerability
Vulnerability Summary
Type: Signature Bypass via Unsigned Fee Parameter
Severity: Medium
Status: Confirmed and Reproducible
The
/utxo/transferendpoint (node/utxo_endpoints.py) does not include thefee_rtcparameter in Ed25519 signature verification. This allows an attacker with network-level access (MITM or compromised relay server) to modify the fee after the client has signed the request.Attack Scenario
Client Intent: Send 10 RTC with 0.0001 RTC fee (total: 10.0001 RTC)
{"amount": 10.0, "from": "alice", "memo": "", "nonce": 1, "to": "bob"}Network Interception: Attacker modifies HTTP request
fee_rtc: 0.0001→fee_rtc: 100.0sigAlice(message)remains valid ✓Server Verification: Server validates signature
Transaction Execution: Server applies with attacker's fee
Root Cause
File:
node/utxo_endpoints.pyLines 273-280 (Signed message):
Line 282 (Signature verification):
Lines 249, 288 (Fee extraction - AFTER signature check):
The fee is extracted from the HTTP request AFTER signature verification, allowing modification without detection.
Proof of Concept
See
test_utxo_fee_manipulation_poc.py:Impact Assessment
Recommended Fix
Include
fee_rtcin the signed message:Backward Compatibility: May require wallet update to include fee in signature. Consider transition period supporting both formats.
Files Submitted
security_audit_fee_manipulation_v1.md - Complete audit report
test_utxo_fee_manipulation_poc.py - Reproducible PoC tests
Testing Methodology
Comparison to Prior Work
Generated by Red Team Security Audit
Date: 2026-04-10