On the night of August 8, a series of targeted attacks occurred on Lightning Network nodes deployed through the popular payment server BTCPay. The attackers exploited a critical vulnerability that allowed them to remotely gain control over the nodes and withdraw all funds. BTCPay developers promptly confirmed the exploitation of the vulnerability and strongly recommended that users of LND—the most common Lightning implementation—immediately update to version 2.4.2 or completely shut down the server until the circumstances are clarified.
The core issue: leakage of .macaroon files
At the heart of the incident lies an error in the authorization mechanism. To access a Lightning node, applications use .macaroon files—a kind of "cookie keys" that grant rights to manage channels and funds. Due to a software flaw, these files could be obtained remotely without any authentication. This gave the attacker full control over the node: closing channels, initiating transactions, and withdrawing liquidity.
It is important to emphasize: the vulnerability only affected configurations with LND. Regular BTCPay bitcoin wallets, including hot ones, remained secure. However, all coins held at the LND address were at risk, since that address is controlled by the compromised node.
First victims and the scale of the attacks
Official data on the number of affected merchants and the total damage has not yet been disclosed—the project team promises to provide a full analysis of the incident in the coming days. Nevertheless, at least two public confirmations of the hacks are already known.
The CEO of hardware wallet manufacturer Foundation, Zach Herbert, reported that overnight the attackers completely drained the company's Lightning node on BTCPay. At the same time, Foundation's on-chain wallet was not affected, confirming the targeted nature of the attack. A similar incident occurred with the bitcoin publication Citadel21, whose node was also "swept"; fortunately, only insignificant amounts were stored there—as explained by the leading commentator under the pseudonym hodlonaut, due to precautionary measures before the activation of BIP-110.
Context: a wave of audits with AI
Notably, the problem was discovered during an audit using artificial intelligence. Participants of the volunteer organization Bitcoin Red Team, which in early August launched a large-scale review of bitcoin projects' codebases using neural networks, generating thousands of reports, had warned about it in advance. This is not the first alarming signal for the ecosystem: recall that in late July, about 500 owners of Coldcard hardware wallets lost 594.48 BTC (~$38.2 million) as a result of a similar attack.
My analysis: This incident is a vivid reminder that even mature infrastructure projects in the bitcoin ecosystem remain vulnerable. Using AI for audits is a step forward, but it does not replace manual testing and responsible key storage. For Lightning node operators, it is critically important not only to keep up with updates but also to diversify risks, avoiding holding significant amounts on a single node. Given the speed of Bitcoin Red Team's response, one can hope that a full breakdown of the incident will shed light on the attack vectors and help prevent future hacks.