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

Reject psbts whose outputs exceed their inputs

Public commit record

What the developer wrote

Authored by okaybro

73/100 · Adequate
Reject psbts whose outputs exceed their inputs

embit computes the fee as inputs minus outputs and never looks at the sign of
the result, so a psbt that spends more than it funds parses cleanly and reaches
the review flow quoting a negative fee.

Raise PSBTNegativeFeeError as soon as the fee is known and route it to its own
warning. Malformed rather than hostile: no honest coordinator builds one and
the network would refuse to relay it, so it gets a plain warning, not the
attack framing. A zero fee is still accepted.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a bug in SeedSigner where a malformed Bitcoin transaction file (PSBT) whose outputs spend more than its inputs could be loaded and shown to the user with a nonsensical negative fee. The fix rejects such PSBTs during parsing and shows the user a plain warning instead. It is treated as bad data, not an attack, because no honest tool creates these and the Bitcoin network would not relay them anyway.

Recommended action

No immediate user action required beyond applying the update. Developers should ensure any downstream PSBT parsing similarly validates fee sign before presenting transaction summaries.

Security signals we found

01

Input validation gap: signed arithmetic result used without sign check

02

UI deception risk: negative fee displayed to user during transaction review

03

Denial-of-service-by-confusion: malformed PSBT could reach review flow

04

Defensive fix: explicit exception and user-facing warning added

05

No signing occurs for malformed PSBT

Risk score

Why this scored 50/100

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