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

psbt: reject trailing data when parsing if WALLY_PSBT_PARSE_FLAG_COMPLETE is used

Public commit record

What the developer wrote

Authored by KY-U

75/100 · Adequate
psbt: reject trailing data when parsing if WALLY_PSBT_PARSE_FLAG_COMPLETE is used

Set the flag unconditionally for base64 inputs.

Add PSBT v0 and v2 regression test cases with a trailing byte.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit tightens how the library reads PSBT (Partially Signed Bitcoin Transaction) data. It adds a new parsing flag that requires the parser to consume the entire input, and turns that flag on automatically when reading base64-encoded PSBTs. Previously, extra bytes tacked onto the end of a PSBT could be silently ignored. The change is defensive: it helps prevent malformed or intentionally padded PSBTs from being accepted as valid.

Recommended action

Review callers that pass raw bytes and may need WALLY_PSBT_PARSE_FLAG_COMPLETE for strict validation. Ensure downstream consumers expecting trailing-byte tolerance are updated. Consider whether the new flag should also be recommended in documentation for security-sensitive PSBT ingestion.

Security signals we found

01

New strict-input-consumption parse flag added

02

Base64 decoder now enforces complete input consumption automatically

03

Trailing bytes after a valid PSBT now rejected in COMPLETE mode

04

Regression tests added for trailing-byte PSBT v0 and v2

05

Behavior change in public API parsing functions

Risk score

Why this scored 51/100

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