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

lnpeer: forwarding: dont release preimage if dont_settle_htlc

Public commit record

What the developer wrote

Authored by f321x

65/100 · Adequate
lnpeer: forwarding: dont release preimage if dont_settle_htlc

If a payment hash is in LNWallet.dont_settle_htlcs the preimage
shouldn't be released even when just forwarding.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's Lightning Network payment forwarding. Normally, Electrum can mark certain payment hashes as 'do not settle' (dont_settle_htlcs), meaning it should not reveal the secret preimage that unlocks a payment. However, the old code would reveal that secret anyway when the payment was being forwarded through the node, not just when the node was the final recipient. The fix checks the 'do not settle' list before releasing the preimage, even during forwarding.

Recommended action

Treat as a security-relevant bug fix. Users running Lightning nodes on affected versions should upgrade. Review whether any other preimage-release paths similarly bypass dont_settle_htlcs.

Security signals we found

01

Preimage disclosure control bypass in forwarding path

02

Logic gap between local HTLC settlement policy and forwarding behavior

03

Fix adds explicit guard before get_preimage() call

Risk score

Why this scored 58/100

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