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

Verify Electrum transaction responses before use

Public commit record

What the developer wrote

Authored by Elias Rohrer

90/100 · Strong
Verify Electrum transaction responses before use

Electrum confirmations must reject transaction_get responses whose body
does not compute the requested txid. Otherwise a malicious server can
substitute an unrelated transaction and provide matching Merkle data for
the substituted body.

Co-Authored-By: HAL 9000

This finding was discovered by Project Loupe
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a security hole in how a Bitcoin Lightning wallet talks to Electrum servers. Previously, the wallet asked a server for a specific transaction by its ID, but it did not check that the returned transaction actually matched that ID. A malicious or compromised Electrum server could send a different transaction instead, and the wallet would trust it. The fix adds a simple verification step: after receiving a transaction, the wallet recomputes its ID and rejects it if it does not match what was requested. The commit message explicitly says this prevents a malicious server from substituting an unrelated transaction and providing matching proof data.

Recommended action

Upgrade to a version containing this commit. If running an older version and using Electrum for transaction sync, treat Electrum servers as partially trusted and consider switching to a trusted Bitcoin Core RPC backend until patched. No immediate on-chain action is required for users already on a patched version.

Security signals we found

01

Commit title and message explicitly describe a security-relevant verification failure

02

Fix adds txid recomputation and equality check against requested txid

03

Fix is applied at multiple call sites where `transaction_get` results are consumed

04

Regression test added to prevent removal of the verification checks

05

Commit message attributes discovery to 'Project Loupe' and co-authorship to 'HAL 9000'

Risk score

Why this scored 74/100

Our methodology →
Potential impact 22/30
Exploitability 18/25
Stealth signal 12/15
Affected reach 10/15
Confidence 8/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.