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

plugin: nwc: consider inflight htlcs in get_payment_info

Public commit record

What the developer wrote

Authored by f321x

85/100 · Strong
plugin: nwc: consider inflight htlcs in get_payment_info

Also consider htlcs that are still inflight when calculating
the amount/fee of a payment to prevent calculating an incorrect
payment value/fee when calling get_payment_info directly after
a payment succeeds (one htlc settled, but others could still be
inflight).
This assumes that once a payments htlc got settled all other inflight
htlcs will also get settled.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's Nostr Wallet Connect (NWC) plugin where the reported amount and fee for a Lightning payment could be temporarily wrong right after the payment succeeds. Previously, the code only looked at fully settled payment parts. If one part had settled but others were still in flight, the plugin could report an incomplete or zero amount/fee. The fix now includes still-in-flight payment parts when calculating the total, assuming they will also settle. This is mainly a correctness/reliability fix, not a direct theft-of-funds vulnerability, but incorrect payment info could mislead connected apps or users.

Recommended action

Treat as a routine bug-fix patch with low-to-moderate security relevance. Users running NWC should update to include this fix to avoid incorrect payment reporting. No immediate incident response is indicated unless connected NWC applications made automated decisions based on the transiently wrong values.

Security signals we found

01

Incorrect financial amount/fee reporting in payment info API

02

Race condition between HTLC settlement state and API query

03

Multi-part Lightning payment state handling bug

04

NWC plugin data consistency fix

Risk score

Why this scored 35/100

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