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

Merge pull request #10981 from spesmilo/do_not_sign_txin_with_witness

Public commit record

What the developer wrote

Authored by ThomasV

73/100 · Adequate
Merge pull request #10981 from spesmilo/do_not_sign_txin_with_witness

transaction: do not sign txin if if already has a witness
✓ 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 change prevents Electrum from re-signing Bitcoin transaction inputs that already contain a witness (the data proving the input was authorized). The patch fixes a bug where Electrum could incorrectly sign a non-SegWit input as if it were SegWit when a PSBT already included a witness for that input. This could lead to producing invalid or unintended signatures during transaction signing, especially when handling partially-signed transactions from external signers.

Recommended action

Review and merge if not already merged. Users and downstream wallets should update to include this fix, especially when signing PSBTs produced by external signers or multi-sig workflows where inputs may already carry witness data. Test signing flows involving mixed SegWit/non-SegWit inputs and pre-signed PSBTs.

Security signals we found

01

Incorrect signature algorithm selection for non-SegWit inputs when witness data is present

02

PSBT handling edge case where pre-existing witness data influences signing path

03

Potential invalid signature production during transaction signing

04

Defensive skip of already-witnessed inputs to avoid double-signing or wrong sighash

Risk score

Why this scored 68/100

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