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

fix: reject a PSBT whose outputs exceed its inputs

Public commit record

What the developer wrote

Authored by odudex

85/100 · Strong
fix: reject a PSBT whose outputs exceed its inputs

Such a transaction is invalid on chain, and it used to render as a small
negative fee with fee_percent clamped to 0.1, so the high fee warning
did not fire either. Fail at load instead.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in Krux, a Bitcoin signing device, where a malformed transaction whose outputs spend more than its inputs could be loaded and shown to the user. Normally such a transaction is impossible on the Bitcoin network, but Krux would display it with a tiny negative fee and skip the high-fee warning, potentially tricking a user into approving a transaction that can never be mined. The fix now rejects these PSBTs immediately when loading them.

Recommended action

Review whether other amount-related edge cases (e.g., integer overflow, zero inputs, duplicate inputs) are similarly validated before UI display. Ensure the error message is surfaced clearly to the user.

Security signals we found

01

Input validation gap in PSBT parsing

02

UI rendering bug masking invalid transaction economics

03

Potential social-engineering / user-confusion attack

04

Missing sanity check on input/output amounts

Risk score

Why this scored 66/100

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