Bitcoin’s Lightning Network has a peculiar new headache: some Core Lightning nodes that were attacked keep crashing even after their operators upgrade to the patched software. The reason, as researcher Nishant Bansal’s Oct. 24 disclosure explains, is that the malicious trigger was already saved to disk — and upgrading does not delete it.
The flaw affects Core Lightning versions v25.02 through v26.04. Once a malicious channel announcement is stored, every restart reloads the same trigger, and the operator must manually remove the offending record to restore the node.
How a routing announcement became a kill switch
Channel announcements are how Lightning nodes learn about connections in the network’s routing graph — the map that makes payments possible. The attack exploits a simple logical flaw: Bansal’s crafted announcement named the same previously unknown node as both endpoints of a channel, effectively telling the network that a node was connected to itself.
Vulnerable software accepted the announcement and wrote it to the node’s on-disk gossip_store before loading it into the routing graph. The graph then tried to insert that node twice. A safeguard against duplicates aborted gossipd, the component that handles these announcements — and Core Lightning treated that failure as fatal to the entire node.
In other words, a single malformed message could take a node offline and keep it offline, because the poison was persisted before the crash.
Patched in April, disclosed in October
Here is where the timeline gets interesting. Bitcoin Optech highlighted the issue on Oct. 30, but the preventive patch is months old. Core Lightning merged the fix — PR #9082, which validates endpoint ordering before accepting an announcement — on April 24 and shipped it in v26.04.1 on April 25. Requiring the first node ID to be strictly less than the second also rejects equal IDs, stopping the malformed input from ever being accepted or stored.
The October disclosure explains the residual problem: the validation check applies to incoming announcements, but startup still reads whatever records are already in gossip_store. An upgrade does not remove a malicious record saved before the crash.
Cleanup alone is not enough
Bansal’s recovery guidance requires manually removing the malicious record from gossip_store. But that is only half the fix. The disclosure warns that an attacker can simply resend the same announcement while the attacker-controlled funding output remains unspent, re-crashing a still-vulnerable installation.
There is also a relay risk: Bitcoin Optech notes that Core Lightning releases before v25.02 could accept and propagate such announcements without crashing themselves. An attacker never needed a direct connection to every vulnerable node — older, oblivious nodes could do the delivery work.
For operators choosing an upgrade now, v26.04.1 marks the first fix for this defect. As of Nov. 2, the project’s latest release is v26.06.9, issued Oct. 7, which maintainers strongly recommend installing.
Why downtime is about more than downtime
The most underappreciated part of the disclosure is what an offline node cannot do. Bansal warns that a downed node cannot watch the chain for a revoked channel state — the mechanism that punishes a cheating counterparty — or for a time-limited payment claim that must be made before expiry. Missing either event can put funds directly at risk.
That elevates this from an availability nuisance to a potential security issue. A node stuck in a crash loop is not just failing to route payments; it is failing to defend the funds it is custodied to protect. For merchants and routing operators running Core Lightning, that reframing matters.
Lessons for the wider ecosystem
For everyday crypto users, the story is mostly reassurance: the Lightning Network’s design confines this flaw to Core Lightning nodes, funds in properly watched channels remain protected by the network’s built-in incentive structure, and a fix has existed since April. If you run a Lightning node on Core Lightning and have not upgraded past v26.04.1, this is the moment — and if you suspect you were hit, check your gossip_store before assuming the upgrade alone will save you.
For developers, the deeper lesson is about persistence. Validation that only guards the front door is not enough when the attacker’s payload has already moved in. Any system that writes untrusted input to disk and reloads it at startup inherits this class of bug, and the gap between a preventive patch (April) and a full understanding of the recovery path (October) shows how long residual risks can hide behind a “fixed” label.
Bitcoin’s security culture runs on exactly this kind of slow, public forensics — unglamorous, months after the fact, and quietly essential to keeping the network’s plumbing trustworthy.
seven months from patch to disclosure is the detail routing operators should sit with. you were running a node that dies on one malformed record the entire time and nobody thought that was worth a heads up
seven months is defensible, you want the patch deployed before the flaw goes public. the actual miss is routing ops never got a private heads up in all that time
a poisoned gossip_store record surviving the upgrade is such a classic persistence bug. the patch fixes the code, the disk remembers the attack
running CLN here, wiped gossip_store manually and it came back fine. wild that upgrades just reload the poison on every restart lol
so the patch fixes the parsing bug but the poisoned announcement just sits on disk reloading every restart. upgrade alone does nothing, you have to manually purge the record. nasty little design trap
replying to segfault_wu, this is the part small routing node operators will miss. at least a self channel announcement is easy to grep for once you know it exists
is there a one liner to grep gossip_store for a self channel announcement? dreading doing this across three nodes tonight
Ines, grep -a over the store file with the channel id hex works, binary safe flag is the part everyone forgets. do it with lightningd stopped or you are grepping a moving file
ran the grep with lightningd stopped like you said, two nodes clean, third had a junk record from september i would never have found otherwise. the binary safe flag tip saved me an evening
grep -a over the store saved me too. the binary safe flag should be in the upgrade notes honestly
binary safe flag ask is correct, also run grep -a before your backup rotation not after. saved me a second panic at 2am last week
cln gossip-check –verbose | grep -i self-channel is what i ran on my two nodes. found nothing but slept better after
the manual purge step is the real story here. anybody running v25.02 who got hit before April basically has a time bomb in gossip_store and no alert telling them so
Add size alerting on gossip_store if you run more than two nodes. A corrupted store showed up on mine that way weeks before any of this was public, I just did not know what I was looking at.
Bansal naming the same unknown node as both endpoints of a channel is elegant in a grim way. One malformed announcement and CLN treats it as fatal for the entire node. Patched in April, disclosed in October, still crashing in November.
A channel announcement naming the same unknown node as both endpoints should never have passed validation. Bansal found a genuinely simple logical flaw, and the persistence detail makes it worse.
the resend part is the nastiest bit. you purge the record, attacker fires the same announcement again, round two. upgrade plus purge plus pray
the resend only matters if the attacker is still watching your node though. most of these announcements were probably fire and forget, purge once and you are likely fine. likely
attacker automation is rare for this, it was one research disclosure not a botnet. purge, upgrade, close the rpc port and sleep
The version range is the scary part. v25.02 through v26.04 covers a huge slice of routing nodes, and every one of them is one malformed announcement away from a crash loop that survives upgrades.
one malformed announcement and gossipd dying is treated as fatal for the whole node. brutal failure model for a routing node lol
the self-channel announcement trick is so dumb it loops back to clever. one sanity check comparing the two node ids would have caught this years ago
persistence bugs like this are why snapshot configs matter. patching the parser while the poison record lives on disk is half a fix
half a fix is generous. Patching the parser while telling nobody for seven months is closer to no fix for anyone who caught the record before April.
seven months quiet is the real story. researchers want credit, users want warnings, coordinated disclosure keeps failing the smaller operators
A node that re-crashes after patching because the poison record survives on disk is a textbook persistence bug. The fix is docs too: tell every operator to purge gossip_store after upgrade.