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

python client: reject PSBTv2-only fields in a PSBTv0

Public commit record

What the developer wrote

Authored by Salvatore Ingala

73/100 · Adequate
python client: reject PSBTv2-only fields in a PSBTv0

Similarly to the HS and Rust client, make the python client reject
deserializing PSBTs of version 0 if they contain v2-only fields.

Also clear the required locktimes in convert_to_v2(), as the locktime
of a PSBTv0 is defined by its unsigned transaction.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit tightens input validation in the Python helper library that prepares Bitcoin transaction data for Ledger hardware wallets. It now rejects PSBT files that claim to be the older version 0 format but contain fields that only belong to the newer version 2 format, and it makes sure lock-time values are taken from the original transaction when converting an old PSBT to the new format. The change brings the Python client in line with the existing hardware-side (HS) and Rust clients. It is a defensive consistency fix rather than a confirmed exploit patch.

Recommended action

Review whether any downstream code or tests relied on accepting v2-only fields in v0 PSBTs, and update them if necessary. Consider whether additional v2-only global fields need similar rejection. No urgent deployment action is indicated by the diff alone.

Security signals we found

01

Input-validation hardening: stricter parsing of PSBT version 0 to reject v2-only key types

02

Consistency fix across clients: aligns Python client with HS and Rust client behavior

03

Locktime normalization during v0-to-v2 conversion to prevent per-input locktime from overriding transaction locktime

04

New unit tests covering rejected fields and locktime preservation

Risk score

Why this scored 47/100

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