Critical BTCPay Server Vulnerability: Hackers Drained Merchants’ Lightning Nodes

A difficult week for Bitcoin infrastructure became even worse after a new critical vulnerability in the popular BTCPay Server payment processor allowed attackers to steal funds from merchants’ Lightning nodes. The attack affected companies using LND (Lightning Network Daemon), including hardware wallet manufacturer Foundation and Bitcoin publication Citadel21.

BTCPay Server issued an emergency warning urging all LND users to immediately upgrade to version 2.4.2 or completely shut down their servers until the patch is installed.

🔧 What Is BTCPay Server and Why Does It Matter?

BTCPay Server is a popular open-source payment processor that allows merchants to accept Bitcoin and Lightning payments without intermediaries. Unlike custodial solutions, BTCPay gives merchants full control over their funds by operating as a self-hosted node.

The platform is widely used throughout the Bitcoin ecosystem because of:

  • Full self-custody — merchants control their private keys
  • No processing fees — there are no transaction processing charges
  • Lightning Network support — instant payments with minimal fees
  • Integration with popular e-commerce platforms — WooCommerce, Shopify, and others

BTCPay’s popularity among merchants is precisely what makes this vulnerability especially dangerous, as thousands of businesses accepting Bitcoin payments may have been exposed.

🔓 Technical Details of the Vulnerability: Macaroon Files at Risk

The vulnerability allowed an unauthenticated remote attacker to access critical credential files known as .macaroon files. These files are authorization tokens that grant software permission to interact with an LND Lightning node.

Macaroon files in LND are cryptographic tokens that define levels of access to a node. Compromising these files is effectively equivalent to handing full control of the Lightning node to an attacker.

How the Macaroon System Works in LND

LND uses macaroon files to separate access privileges:

  • Admin macaroon — full control over the node, including moving funds
  • Readonly macaroon — access limited to viewing information
  • Invoice macaroon — permission to create and manage invoices

The attackers gained access to admin macaroon files, allowing them to fully control compromised nodes and withdraw funds.

💰 Scale of the Attack: Who Was Affected

Although BTCPay Server has not disclosed the exact number of affected users or the total amount stolen, several well-known companies have publicly confirmed that they were victims of the attack.

Foundation: Hardware Wallet Manufacturer

Foundation, the company behind the popular Passport hardware wallet, became one of the most notable victims. CEO Zach Herbert confirmed that attackers drained the company’s Lightning node through BTCPay Server.

“Attackers drained our company’s BTCPay Lightning node overnight, closing channels and withdrawing the funds,” Herbert stated. He also noted that BTCPay’s on-chain hot wallet remained untouched.

The incident is particularly ironic given that Foundation specializes in Bitcoin storage security. The company uses BTCPay to accept Lightning payments from customers.

Citadel21: Bitcoin Publication

Citadel21, a popular Bitcoin publication operated by pseudonymous commentator hodlonaut, also reported that its Lightning node had been compromised. However, the publication noted that only a small amount of funds had been stored on the node.

Hodlonaut, known throughout the Bitcoin community for his advocacy and activity, publicly confirmed the incident, drawing additional attention to the security issue.

⚙️ Attack Mechanics: How the Hackers Gained Access

Analysis of the incident reveals a clear sequence of actions by the attackers:

  1. Vulnerability Discovery: The attackers found a way to bypass authentication in BTCPay Server
  2. Obtaining Macaroon Files: Using the vulnerability, they downloaded .macaroon files from victims’ servers
  3. Connecting to LND: With the stolen credentials, they connected to Lightning nodes
  4. Withdrawing Funds: The attackers closed channels and withdrew all available funds

It is important to note that the vulnerability was being actively exploited. This was not a theoretical security flaw, but a real threat that had already resulted in financial losses.

🛡️ What Is Affected and What Is Not

BTCPay Server clearly defined the scope of the vulnerability to prevent unnecessary panic among users:

Affected Systems

  • LND Lightning nodes — the primary target of the attack
  • On-chain wallets inside LND — funds stored in LND’s own on-chain wallet are also at risk
  • All BTCPay versions before 2.4.2 — when used with LND

Unaffected Systems

  • Standard BTCPay on-chain wallets — including hot wallets generated inside BTCPay
  • Other Lightning implementations — c-lightning, Eclair, and others are not affected by this vulnerability
  • Servers without Lightning — users who do not use Lightning are not affected

Key clarification: the vulnerability is specific to LND. Users of other Lightning implementations, or those who do not use Lightning at all, are not exposed to this particular risk.

🚨 Urgent Recommendations: What to Do Right Now

BTCPay Server issued clear instructions for all users:

For LND Users

  1. Immediately upgrade to version 2.4.2 — this is a critical security patch
  2. If you cannot upgrade immediately — completely shut down BTCPay Server until the patch can be installed
  3. Review node activity — verify that no unauthorized transactions have occurred
  4. Rotate macaroon files — generate new credentials after upgrading

For Users of Other Lightning Implementations

Although these users are not affected by this specific vulnerability, BTCPay still recommends upgrading to version 2.4.2 to receive other security improvements.

🔍 The Role of Bitcoin Red Team in Discovering the Vulnerability

BTCPay Server thanked members of Bitcoin Red Team for responsibly disclosing the vulnerability and assisting with the investigation. The team included:

  • Craig Raw — developer of Sparrow Wallet
  • Rob Hamilton — CEO of AnchorWatch
  • Calle — Bitcoin developer
  • Evan Kaloudis — founder of Zeus Wallet

Bitcoin Red Team is an initiative formed by security researchers that recently conducted a large-scale audit of the Bitcoin ecosystem, discovering thousands of vulnerabilities. Their work demonstrates the importance of a proactive security approach in a decentralized ecosystem.

Responsible vulnerability disclosure is a critically important practice in open-source development. Researchers give developers time to create and deploy a patch before the technical details of a vulnerability are made public.

📊 Context: A Week of Vulnerabilities Across Bitcoin Infrastructure

This incident became part of a worrying series of security problems affecting the Bitcoin ecosystem over the previous week:

  • Coldcard (July 30) — a key generation vulnerability resulted in the theft of $89 million
  • Zeus Wallet (August 5) — a cyberattack targeted the wallet’s infrastructure
  • BTCPay Server (August 8) — the current incident involving Lightning nodes

This series of incidents raises important questions about the maturity of Bitcoin infrastructure security and the need for more rigorous auditing of critical components.

🎯 Lessons for Merchants and Node Operators

The BTCPay Server incident provides important lessons for anyone accepting Bitcoin payments or operating Lightning nodes:

Regular Updates Are Critical

Open-source software requires continuous maintenance. Establish a process for regular updates and monitor security advisories closely.

Minimize the Attack Surface

Do not keep large balances in hot wallets. Use cold storage for primary reserves and leave only the operational balance required for day-to-day activity in hot wallets.

Monitor Activity

Configure alerts for suspicious activity on your nodes. Early detection of an attack can significantly reduce potential losses.

Diversification

Do not rely on a single point of failure. Consider using multiple payment processors or different Lightning implementations.

🔮 The Future of Bitcoin Payment Security

This incident is likely to accelerate development in several areas:

Improved Security Auditing

Critical infrastructure such as BTCPay Server will likely undergo more rigorous and frequent security reviews by independent researchers.

Automated Updates

Developers will work to simplify the update process, potentially introducing automatic updates for critical security patches.

Improved Monitoring

More sophisticated tools will likely emerge for monitoring Lightning nodes and detecting anomalous activity in real time.

Educational Initiatives

The community is likely to invest more resources in educating merchants and node operators about security best practices.

💡 Practical Steps for Better Protection

In addition to immediately applying the update, merchants should consider the following long-term measures:

Architectural Measures

  • Environment Isolation — run BTCPay Server in an isolated environment with restricted access
  • Multisig — use multisignature arrangements for large balances
  • Backups — regularly create and test backups

Operational Procedures

  • Channel Limits — set reasonable limits on Lightning channels
  • Regular Audits — periodically review node configuration and activity
  • Incident Response Plan — maintain a predefined response plan for security incidents

💎 Conclusion: Maturity Through Adversity

The BTCPay Server incident is another reminder that security in the cryptocurrency ecosystem is never a finished task. It is a continuous process requiring vigilance, rapid response, and constant improvement.

Positive aspects of the situation include:

  • Rapid discovery — the vulnerability was identified and responsibly disclosed
  • Fast response — BTCPay quickly released a patch and clear instructions
  • Transparency — the project openly informed users about the issue
  • Community involvement — Bitcoin Red Team and other researchers actively assisted

For merchants, this incident is a harsh reminder of the importance of a proactive approach to security. Simple measures such as regular updates and monitoring can prevent significant losses.

For the ecosystem as a whole, it is an opportunity to strengthen security practices and build more resilient infrastructure for the years ahead. Every vulnerability that is discovered and fixed makes Bitcoin stronger.

In the world of open-source development, security is a collective responsibility. Every participant in the ecosystem, from developers to end users, plays an important role in creating a safer environment for everyone.

While BTCPay Server prepares a full postmortem of the incident, expected to be published in the coming days, users should remain vigilant and follow official recommendations. Transparency and openness in security matters are essential to trust and the sustainable development of the Bitcoin ecosystem.

“Security is not a product you can buy once, but a process that must be maintained continuously. In the open-source world, every one of us is part of that process.”

— Bruce Schneier, renowned cryptographer and security expert

10.08.2026, 01:59