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

fix: verify PSBT input amounts before showing the fee

Public commit record

What the developer wrote

Authored by odudex

95/100 · Strong
fix: verify PSBT input amounts before showing the fee

Display, policy and sighash now all read inp.utxo, so the amount on the
review screen is the amount the signer commits to. Any attached previous
transaction must hash to the outpoint being spent, and legacy inputs
require one since their sighash does not commit to the amount.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a security flaw in Krux, a Bitcoin signing device. Before the fix, an attacker could trick the device into showing a low transaction fee on screen while actually signing a much higher fee. The fix makes the device verify that any attached previous transaction really matches the input being spent, and forces legacy (non-Segwit) inputs to include that previous transaction. It also makes sure the amount shown to the user is always the same amount the signature commits to. A small residual risk remains for multi-input Segwit transactions where previous transactions are not required.

Recommended action

Treat this as a security fix and include it in the next release. Users should upgrade firmware before signing high-value transactions, especially with legacy inputs or PSBTs loaded from untrusted coordinators. Wallet developers should ensure legacy inputs include non_witness_utxo and that any witness_utxo values match the real UTXO.

Security signals we found

01

Fixes fee-display/sighash amount mismatch

02

Adds prevout txid hash verification for non_witness_utxo

03

Mandates non_witness_utxo for legacy inputs

04

Unifies display/policy/sighash UTXO source to inp.utxo

05

Adds regression tests including negative and xfail cases

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.