Core Lightning bug can keep nodes crashing after upgrades

A flaw in Core Lightning versions v25.02 through v26.04 can cause repeated crashes after an upgrade if a malformed channel announcement remains in storage. Operators must delete it manually.

A flaw in Core Lightning, software for Bitcoin’s Lightning payment network, can cause a node to crash repeatedly after an upgrade if a malformed channel announcement remains in its on-disk storage. Operators must remove the offending record from the node’s gossip_store to restore normal operation.

Researcher Nishant Bansal disclosed the issue on Oct. 24. The malformed announcement identifies the same previously unknown node as both endpoints of a channel. Affected versions accept the announcement and save it before trying to add it to the network’s routing graph.

When the node restarts, its gossipd component reloads the announcement and tries to add the same node twice. A safeguard against duplicate entries stops gossipd, and Core Lightning treats that failure as fatal to the entire node.

Core Lightning merged a fix in pull request No. 9082 on April 24 and released it in version 26.04.1 on April 25. The fix checks that the first node identifier in an announcement is strictly smaller than the second. This rejects announcements with identical identifiers or incorrectly ordered endpoints.

The fix blocks new malformed announcements from being accepted and stored. It does not remove records saved before an upgrade. Startup still reads those records, so upgrading alone may leave an affected node in a crash-and-restart cycle. Manual removal of the malicious entry from gossip_store is required for recovery.

Removing the record without upgrading can leave the node open to another crash. Bansal’s disclosure says an attacker can resend the announcement while the attacker-controlled funding output remains unspent.

An offline node may miss events that require a timely response, including a revoked channel state or a payment claim that expires after a set period. Missing those events can put funds held through the channel at risk.

Core Lightning versions released before v25.02 could accept and relay the announcements without crashing themselves. This allowed an attacker to distribute the malformed data without connecting directly to every affected node.

The latest Core Lightning release as of Nov. 2 is version 26.06.9, issued Oct. 7.

Articles by this author