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

primitives: prevent null prevout in non-coinbase transactions

Public commit record

What the developer wrote

Authored by jrakibi

73/100 · Adequate
primitives: prevent null prevout in non-coinbase transactions

Non-coinbase transactions must not contain a null prevout (coinbase prevout)
Add this validation to the transaction decoder to reject txs
that violate this rule.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds a safety check in the Rust Bitcoin library's transaction decoder. It ensures that any transaction with more than one input cannot contain a 'coinbase-style' empty previous transaction reference. Such a reference is only allowed in the special coinbase transaction that creates new coins. Without this check, a malformed or malicious transaction could slip through and potentially cause incorrect behavior in software using this library to parse Bitcoin transactions.

Recommended action

Review whether the same validation is needed in other transaction construction or deserialization paths (e.g., direct from_bytes, consensus::Transaction, or psbt deserialization) to ensure consistent enforcement across the library.

Security signals we found

01

Consensus-rule enforcement added to transaction decoder

02

Rejection of null prevout in non-coinbase transactions

03

New error variant for malformed transaction input

04

Regression test from Bitcoin Core tx_invalid.json

Risk score

Why this scored 60/100

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