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

Merge PR 'Verify UTXO output matches previous transaction in coin selection' (#5490)

Public commit record

What the developer wrote

Authored by wpaulino

91/100 · Strong
Merge PR 'Verify UTXO output matches previous transaction in coin selection' (#5490)

from bot/5422-reject-utxos-that-disagree-with-5358a3 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5490
Reviewed-by: wpaulino <wpaulino@noreply.git.rust-bitcoin.org>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This change tightens a safety check when a Lightning wallet picks which Bitcoin coins (UTXOs) to spend. Previously, the code only confirmed that the referenced transaction had an output at the expected position. Now it also confirms that the actual output amount and script exactly match what the wallet claims. This prevents a class of bugs or attacks where a wallet source provides a UTXO whose details do not match the real previous transaction, which could lead to building invalid or unexpected funding/closing transactions.

Recommended action

Treat as a security-hardening fix. Users and downstream wallets should upgrade to ensure their coin-selection path validates UTXO outputs against the actual previous transaction. Review any custom wallet-source implementations to ensure they return consistent prevtx and UTXO data.

Security signals we found

01

Validation strengthened from presence check to exact output equality

02

Coin-selection path is security-critical for funding and closing transactions

03

Error message change indicates intent to detect mismatched UTXO data

04

Small, targeted patch suggests a specific bug or edge case was being closed

Risk score

Why this scored 59/100

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