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

Merge pull request #10940 from accumulator/fix_10937

Public commit record

What the developer wrote

Authored by Felix

73/100 · Adequate
Merge pull request #10940 from accumulator/fix_10937

Add BOLT11DecodeException and InvalidBitcoinURI wraps for missing uncaught exceptions.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit tightens how Electrum parses Bitcoin payment requests (BOLT11 lightning invoices and BIP21 URIs). It turns previously uncaught internal errors into proper validation failures, rejects malformed invoice fields that used to be silently skipped, and adds a wallet database upgrade that deletes stored invoices which no longer pass the stricter checks so old wallets can still open. The main user-visible risk is that a malicious or malformed invoice/URI could previously crash the parser or be accepted when it should have been rejected.

Recommended action

Review the stricter BOLT11 parsing rules for compatibility with real-world invoices; ensure the database upgrade (seed_version 73) safely handles wallets containing old malformed invoices; monitor for user reports of previously valid invoices being rejected; consider whether any of the newly enforced rules (e.g., mandatory payment_secret) could break interoperability with non-Electrum implementations.

Security signals we found

01

Stricter input validation for externally supplied BOLT11 invoices and BIP21 URIs

02

Previously uncaught exceptions (ValueError, UnicodeDecodeError, ecc errors) are now wrapped in domain-specific decode exceptions

03

Malformed fallback addresses are skipped rather than aborting or crashing

04

Wallet database upgrade removes stored invoices that fail stricter parsing to prevent wallet load failures

05

Fixed-length and mandatory BOLT11 tag enforcement aligned with BOLT11 spec

06

Test additions cover malformed route tags, invalid signatures, bech32 errors, amount/date validation, and URI parsing edge cases

Risk score

Why this scored 62/100

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