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

feat: Fix change-output classification to require verified descriptor derivation (#387)

Public commit record

What the developer wrote

Authored by Schnuartz AI

85/100 · Strong
feat: Fix change-output classification to require verified descriptor derivation (#387)

Co-authored-by: Mike Tolkachev <contact@miketolkachev.dev>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a security bug in Specter DIY, a hardware wallet, where the device could wrongly hide a transaction output as 'change' (your own money coming back) when it actually went to an attacker or to another of your own wallet addresses. The old code trusted the host computer's claim that an output was change based only on which wallet owned the inputs. The new code independently re-derives the output address from the wallet's descriptor and only hides it as change when the math matches exactly, the descriptor has the standard two branches, and the output is on the change branch. It also warns the user when the host's metadata does not match.

Recommended action

Users should upgrade to a firmware build containing this commit. After upgrading, verify that transaction confirmation screens still show all non-change outputs and any outputs with warnings. Developers should review the new test suite for completeness and ensure the descriptor cache does not introduce side channels on the constrained hardware target.

Security signals we found

01

Fixes incorrect change-output classification that could hide attacker-controlled or self-payment outputs

02

Adds cryptographic verification of PSBT derivation metadata against locally stored descriptor and output scriptPubKey

03

Adds explicit warnings for inconsistent host-supplied change metadata

04

Narrows automatic change classification to two-branch descriptors with branch-list position 1

05

Adds extensive regression tests covering forged metadata, multi-branch descriptors, Taproot, Liquid, and UI visibility

06

Updates security model documentation to describe the new conservative behavior

Risk score

Why this scored 78/100

Our methodology →
Potential impact 24/30
Exploitability 18/25
Stealth signal 12/15
Affected reach 10/15
Confidence 9/10
Evidence quality 5/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.