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

Retry publishing txs evicted by unconfirmed conflicts (#3397)

Public commit record

What the developer wrote

Authored by pm47

93/100 · Strong
Retry publishing txs evicted by unconfirmed conflicts (#3397)

* Keep retrying local anchor on unconfirmed conflicts

When the funding output was spent and our local commit tx couldn't be found,
we assumed that a remote commit tx was available and permanently gave up on
our local anchor. Since #3376, we may force-close with an older commitment
when our peer withholds tx_signatures for a splice: if our peer publishes
that splice transaction, our commit tx is rejected because it conflicts with
it, and if our peer then double-spends their splice input, we never publish
our commit tx again (until we restart). This lets them steal HTLCs by
publishing their commitment later.

We now only give up on our local anchor if a remote commit tx is actually
available, or if the funding output is spent by a confirmed transaction.
Otherwise we retry at the next block, which publishes our commit tx with our
anchor as soon as the conflicting transaction is evicted.

* Retry final txs after unconfirmed conflicts

When a final (non-replaceable) transaction was rejected because it conflicts
with an unconfirmed mempool transaction, we never retried it. But our peer
can evict that conflicting transaction by double-spending one of its other
inputs, which makes our transaction valid again: our peer could then use
this to make us abandon our commit tx or our penalty transactions.

We now retry at every block until the conflicting transaction confirms, as
we already do for replaceable transactions.

* Retry local anchor with unconfirmed funding tx (#3402)

When the funding output is spent by an unconfirmed transaction and no remote
commit tx is available, we keep retrying our local anchor. But we detected
this by checking the funding output in the UTXO set, which doesn't contain
outputs of unconfirmed transactions: when the funding tx was unconfirmed
(e.g. with 0-conf), we thus still gave up on our commit tx.

If the funding tx is unconfirmed, it can only be spent by an unconfirmed
transaction, so we now retry at the next block in that case as well.

---------

Reported-By: [project-loupe](https://github.com/project-loupe)
Reported-By: @erickcestari

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Fabrice Drouin <sstone@users.noreply.github.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a security bug in the Eclair Lightning node where a malicious peer could trick the node into permanently giving up on publishing its own commitment or penalty transactions. By publishing and then double-spending a conflicting transaction, an attacker could prevent the node from claiming funds it was owed, potentially allowing the attacker to steal HTLCs or delay justice transactions. The fix makes the node keep retrying publication each block until the conflicting transaction actually confirms.

Recommended action

Treat this as a security fix and include in release notes. Operators running Eclair nodes, especially those using anchor outputs and/or 0-conf channels, should upgrade promptly. Review whether any channels were force-closed around the affected code versions and monitor for delayed commitment or penalty publication.

Security signals we found

01

The commit message explicitly describes theft risk: "This lets them steal HTLCs by publishing their commitment later"

02

Attack vector involves a malicious peer withholding tx_signatures and double-spending a splice input

03

Fix changes abandonment logic for local commit anchor preconditions

04

Fix removes differential handling of PublishFinalTx vs PublishReplaceableTx for unconfirmed conflicts

05

Adds test cases reproducing the attack path for both confirmed and zero-conf funding transactions

06

Reported by external security researchers (project-loupe, erickcestari)

Risk score

Why this scored 82/100

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