AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 35 Bitcoin

interface: check genesis hash on connection

Public commit record

What the developer wrote

Authored by f321x

68/100 · Adequate
interface: check genesis hash on connection

Prevents the client from accidentally connecting to a server on a
different network.
I noticed its possible to connect to mainnet servers on a signet
instance causing the recent peers to get populated with mainnet peers
rendering the wallet instance barely usable. Doing this check should
prevent this and similar issues.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds a safety check when Electrum connects to a Bitcoin server. It asks the server for its genesis block hash and disconnects if it doesn't match the network Electrum is configured for (mainnet, testnet, signet, etc.). This prevents accidental cross-network connections that could fill the peer list with incompatible servers and make the wallet misbehave. It is a hardening fix, not a clear-cut exploit patch.

Recommended action

Treat as a defensive hardening improvement. Review whether the server.features call is available on all supported ElectrumX versions and whether older servers lacking it are handled gracefully. No urgent security response appears necessary.

Security signals we found

01

Network boundary enforcement added

02

Genesis hash validation on connection

03

Graceful disconnect on mismatch

04

Unit test coverage added for new behavior

Risk score

Why this scored 35/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 4/15
Affected reach 7/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.