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

fix: psbt output parsing

Public commit record

What the developer wrote

Authored by soralit

40/100 · Thin
fix: psbt output parsing
✓ Subject identifies a change✓ Uses a recognizable type or scope! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes how the Keystone 3 hardware wallet parses Bitcoin PSBT (Partially Signed Bitcoin Transaction) outputs. The change adds verification that an output's Bitcoin address actually matches the public key and derivation path claimed in the transaction, rather than trusting the PSBT's output metadata blindly. If the previous code accepted incorrect or attacker-controlled output data, a user could be tricked into approving a transaction that sends funds to an unexpected address. The commit also refactors some address-calculation code into a shared helper.

Recommended action

Review the new parse_my_output() logic for completeness: ensure all supported address types (including future Taproot outputs) are covered, verify error handling does not leak sensitive path data, and add regression tests with crafted PSBTs whose bip32_derivation claims do not match the actual scriptPubKey. Consider whether the old get_my_output_path() remains safely used elsewhere.

Security signals we found

01

Missing cryptographic verification of PSBT output scriptPubKey against wallet-derived keys

02

Trusting attacker-supplied PSBT output metadata (bip32_derivation) without script validation

03

Potential address spoofing / change-address manipulation in hardware wallet transaction display

04

Refactor of address derivation logic into reusable helper

Risk score

Why this scored 59/100

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