The night of August 8 turned black for Lightning Network operators using the BTCPay payment server. Attackers exploited a critical vulnerability in configurations with LND software and mass-withdrew funds from nodes. BTCPay developers promptly confirmed the attack and issued an urgent warning: all LND users must immediately update to version 2.4.2 or completely disable the server until the circumstances are clarified.

The core of the problem: macaroon leakage

BTCPay is a popular solution for stores that want to accept bitcoin without intermediaries by connecting Lightning Network for micropayments. Application access to the node in this ecosystem is regulated by .macaroon files. This is where the breach was hidden: due to an authorization error, these files could be remotely obtained without any credentials. Having gained control over the macaroons, the attacker gained full access to the node—up to closing channels and withdrawing all funds to their own addresses.

It is important to emphasize: the vulnerability affects exclusively configurations with LND—the most common software for Lightning nodes. Classic BTCPay bitcoin wallets, including hot ones, remained safe. However, coins held on LND addresses were directly at risk, as they are controlled by the compromised node.

First victims and the scale of the attack

The exact number of affected stores and the total damage have not yet been disclosed—developers promise to present a full analysis of the incident in the coming days. However, public confirmations already exist. The CEO of hardware wallet manufacturer Foundation, Zack Herbert, reported that the company's Lightning node on BTCPay was drained overnight, although the on-chain wallet was not affected. The bitcoin publication Citadel21, run by well-known commentator hodlonaut, also confirmed a similar hack. Fortunately, only insignificant amounts were stored on his node—due to caution before activating BIP-110.

Notably, the problem was discovered during an audit using artificial intelligence. The volunteer organization Bitcoin Red Team, which launched a large-scale review of bitcoin project codebases using neural networks in early August, had previously notified BTCPay about the critical error. This is not the first incident in the industry recently: recall that on the night of July 31, hackers stole 594.48 BTC (~$38.2 million) from approximately 500 owners of Coldcard hardware wallets.

My analysis: This incident is another reminder that even the most popular and "decentralized" solutions are not immune to code errors. Using AI for audits is a step forward, but it is clearly lagging behind. Node operators should reconsider their security protocols: two-factor authentication and regular updates should become not a recommendation, but a strict standard. Otherwise, we risk seeing even larger-scale thefts that undermine trust in Lightning Network as a payment infrastructure.