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

Merge pull request #10922 from accumulator/fix_use_change_config_sweeps

Public commit record

What the developer wrote

Authored by ThomasV

73/100 · Adequate
Merge pull request #10922 from accumulator/fix_use_change_config_sweeps

wallet: make sure there is a change address in case of sweeps
✓ 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 fixes a bug in the Electrum Bitcoin wallet where, if the user had disabled change addresses, funds from 'sweep' transactions (such as recovering Lightning channel funds or claiming submarine swaps) could accidentally be sent back to an address controlled by someone else instead of to the user's own wallet. The fix forces the creation of a wallet-owned change address whenever a sweep is involved, even when change addresses are normally disabled.

Recommended action

Users running Electrum with Lightning or submarine swaps enabled, especially those who have disabled change addresses, should upgrade to a version containing this fix. Reviewers should verify that the new change address is always generated from the wallet's own keypool and that the is_mine check correctly covers all sweep input types.

Security signals we found

01

Funds could be sent to a non-ismine address when use_change is disabled

02

Affected flows include Lightning channel sweeps and submarine swap claims

03

Coin chooser fallback to first input address is unsafe for sweep inputs

04

Fix explicitly creates a wallet-owned change output for sweep transactions

05

Regression tests verify change output is ismine for sweep-only and mixed sweep/payment batches

Risk score

Why this scored 64/100

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