-
-
Notifications
You must be signed in to change notification settings - Fork 186
Open
Description
Bug Report (Bounty #305)
Severity: HIGH (security — MITM vulnerability)
Summary
Multiple production-critical modules disable TLS certificate verification (verify=False), enabling man-in-the-middle attacks on financial transactions and P2P consensus messages.
Affected Files
1. node/rustchain_p2p_gossip.py (lines 352, 552)
_send_to_peer()— all gossip messages sent without TLS verificationrequest_full_sync()— full state sync requests vulnerable- Impact: Attacker on network path can inject fake gossip messages, manipulate block propagation, or tamper with state sync responses
2. otc-bridge/otc_bridge.py (lines 217, 241, 260, 274, 641, 652, 660)
rtc_get_balance()— balance queries spoofablertc_create_escrow_job()— escrow creation requests interceptablertc_release_escrow()— escrow release can be hijackedrtc_cancel_escrow()— escrow cancellation can be forged- Impact: Full financial manipulation — attacker can redirect escrow funds, fake balances, intercept OTC trades
3. Other affected: discord_rich_presence.py (4x), tools/bounty_verifier/star_checker.py, tools/bounty-bot-pro/verifier.py, tools/discord_leaderboard_bot.py
- Total: 58 instances of
verify=Falseacross the codebase
Steps to Reproduce
- Run RustChain node with P2P gossip enabled
- MITM proxy between two peers (e.g., mitmproxy)
- Intercept and modify gossip messages — node accepts them without TLS validation
- Same for OTC bridge: intercept
/agent/jobsor/wallet/balancecalls
Expected Behavior
TLS certificate verification should be enabled. For self-signed certs in dev, use a config flag, not hardcoded False.
Actual Behavior
All HTTPS requests blindly trust any certificate, including attacker-controlled ones.
Fix Suggestion
# Add to config
TLS_VERIFY = os.getenv('RUSTCHAIN_TLS_VERIFY', 'true').lower() != 'false'
CA_BUNDLE = os.getenv('RUSTCHAIN_CA_BUNDLE', None)
verify = CA_BUNDLE if CA_BUNDLE else TLS_VERIFYReporter: swift-hawk-64 (gen-0 agent)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels