Market Prices

BTC Bitcoin
$75,569.7 -4.11%
ETH Ethereum
$2,396.97 -5.92%
SOL Solana
$96.81 -6.36%
BNB BNB Chain
$712 -1.59%
XRP XRP Ledger
$1.28 -11.38%
DOGE Dogecoin
$0.0799 -5.57%
ADA Cardano
$0.1951 -7.58%
AVAX Avalanche
$7.25 -4.98%
DOT Polkadot
$0.9448 -6.57%
LINK Chainlink
$10.93 -6.35%

Event Calendar

{{年份}}
15
04
halving Bitcoin Halving

Block reward reduced to 3.125 BTC

22
03
unlock Optimism Unlock

Circulating supply increases by about 2%

30
04
upgrade Celestia Mainnet Upgrade

Improves data availability sampling efficiency

10
05
upgrade Ethereum Pectra Upgrade

Raises validator limit and account abstraction

08
04
upgrade Solana Firedancer

Independent validator client goes live on mainnet

18
03
unlock Sui Token Unlock

Team and early investor shares released

12
05
halving BCH Halving

Block reward halving event

28
03
unlock Arbitrum Token Unlock

92 million ARB released

Gas Tracker

Ethereum 28 Gwei
BNB Chain 3 Gwei
Polygon 42 Gwei
Arbitrum 0.5 Gwei
Optimism 0.3 Gwei

💡 Smart Money

0x24ac...6332
Institutional Custody
+$2.4M
73%
0x54ed...7ad0
Early Investor
+$3.6M
84%
0x5994...8488
Arbitrage Bot
+$2.8M
79%

🧮 Tools

All →

The Macaroon Leak: How BTCPay Server's Self-Custody Promise Became a Remote Attack Vector

Pomptoshi Press Releases

Contrary to the narrative that open-source self-custody is the safest path, a recently disclosed vulnerability in BTCPay Server and LND tells a different story. Unauthenticated remote attackers could access LND's .macaroon credential files—essentially the keys to the Lightning node. Funds were stolen. The code doesn't lie. The promise of zero fees and zero intermediaries collapsed under the weight of a file access misconfiguration. This is not a peripheral bug; it is a structural failure in the self-custody model.


Context

BTCPay Server is a free, open-source, self-hosted Bitcoin payment processor. It connects merchants to the Lightning Network via LND (Lightning Network Daemon). No fees, no intermediaries. Just you, your node, and your security. The project has seen over one million downloads and hundreds of thousands of active instances. It is the flagship of the self-custody payment movement.

On [date of disclosure], the project released an urgent security update. Versions 2.4.2 (BTCPay Server) and 0.21.1 (LND) patched a vulnerability that allowed an unauthenticated remote attacker to access LND's .macaroon credential files. With those files, the attacker could take full control of the Lightning node and transfer funds. The exploit was confirmed in the wild. The code doesn't lie.


Core: The Pre-Mortem Analysis

I've seen this failure mode before. In 2017, during the Ethereum Classic 51% attack audit, I traced how inadequate file permissions led to reorg exploitation. In 2021, reverse-engineering the Olympus DAO bond contract, I found recursive yield mechanics that were essentially pre-loaded exit liquidity. The pattern is always the same: an assumption about the security boundary that turns out to be false. Here, the assumption was that the file system path containing .macaroon files would never be exposed to remote access. I measure risk in gas units, not in hope.

Let me walk through the failure chain.

The Attack Vector

A .macaroon file is a cryptographic credential that grants access to an LND node's API. It is typically stored in the LND data directory. The vulnerability allowed an attacker to download this file directly via a crafted HTTP request to the BTCPay Server instance. The exact mechanism is likely a path traversal or a misconfigured static file server. The key point: no authentication required.

Once the attacker has the .macaroon file, they can call any LND RPC method that the macaroon permits. In a default configuration, that includes sending funds from Lightning channels and even on-chain transactions if the wallet is managed by LND. The attack is complete. The attacker doesn't need to brute-force anything. They just need network reachability to the BTCPay Server host.

The Macaroon Leak: How BTCPay Server's Self-Custody Promise Became a Remote Attack Vector

Why This Is a Structural Failure

This is not a subtle race condition or a complex cryptographic flaw. It is a basic access control error. The code assumed that the file system is private. That assumption is acceptable in a controlled environment. But in a self-custody context, the user is responsible for the environment. The user must configure firewalls, reverse proxies, and permissions. Many do not. The result is a systemic risk: the security model transfers the burden of infrastructure security to the end user, who is often not equipped to handle it.

Chaos is just data waiting to be compiled. The code compiled into a failure because the architecture did not enforce a separation between the web server's public directory and the LND credential store. The pre-mortem is clear: this project was designed with the assumption that the user would secure the perimeter. But the perimeter is porous. The vulnerability is a single point of failure in the entire self-custody promise.

The Scale of the Attack Surface

Hundreds of thousands of instances. Over one million downloads. Even if only 10% are exposed to the public internet, that is tens of thousands of vulnerable nodes. The exploit may have been active for weeks before discovery. The official disclosure did not specify the first exploited date, which suggests the project team could not precisely determine the origin. This is common in cases where the attack is silent: the attacker takes a small amount from many nodes to avoid detection.

The Official Response

BTCPay Server and LND both released patches. The chain wallet (on-chain Bitcoin) was declared unaffected. But that is a partial truth. Lightning channel funds are at risk. Additionally, if the LND node manages on-chain funds (e.g., for channel opens), those are also at risk. The statement "chain wallet unaffected" is technically correct only if the on-chain wallet is managed by BTCPay Server directly, not by LND. Many users run a combined setup. The risk is wider than the official communication suggests.

The Macaroon Leak: How BTCPay Server's Self-Custody Promise Became a Remote Attack Vector

What This Tells Us About Self-Custody

From my experience in the 2022 Terra Luna collapse, I analyzed how the algorithmic stabilizer's delta-neutral hedging failed because the reserve was composed of its own token. The failure was mathematical. Here, the failure is operational. The self-custody model requires the user to be a sysadmin, a cryptographer, and a security engineer. Most users are merchants—they want to sell goods, not run a hardened server. The cost of self-custody security is a hidden tax. It is the time spent monitoring logs, applying patches, and configuring firewalls. For many, that tax is higher than the 1% fee of a custodial processor like OpenNode or Strike.


Contrarian: What the Bulls Got Right

But let me offer a contrarian angle. The open-source community responded within hours of the discovery. The fix was coordinated across two projects. The disclosure was responsible—no technical details were released before the patch. This resilience is a strength. The bulls argue that self-custody is the only way to maintain sovereignty, and they have a point. The vulnerability, while severe, is fixable. The response shows that the ecosystem can self-correct.

Moreover, this event may drive improvements. Security audits, bug bounty programs, and mandatory code signing could become standard. The project may emerge stronger. The contrarian insight: this is not the death knell for self-custody; it is a wake-up call that will force the ecosystem to grow up.

However, the bulls ignore the asymmetric cost of security. When a custodial service is hacked, the service absorbs the loss. When a self-custody tool is hacked, the user loses everything. The risk is not equally distributed. The contrarian view must acknowledge that the self-custody model's security burden is regressive—it falls hardest on those who can least afford the time and expertise to manage it.


Takeaway

The fork was inevitable; the error was optional. The vulnerability in BTCPay Server and LND is a symptom of a broader issue: the industry expects users to secure their own infrastructure without providing the necessary guardrails. The code doesn't lie. The risk is real. The question is not whether self-custody will survive—it will. The question is whether the ecosystem will invest in making self-custody safe for the average user, or whether it will remain a privilege for the technically elite.

I measure risk in gas units, not in hope. And the gas required to secure a node is higher than most merchants are willing to pay. The market will decide. But the code has already spoken.

Fear & Greed

69

Greed

Market Sentiment

Altseason Index

42

Bitcoin Season

BTC Dominance Altseason

Market Cap

All →
# Coin Price
1
Bitcoin BTC
$75,569.7
1
Ethereum ETH
$2,396.97
1
Solana SOL
$96.81
1
BNB Chain BNB
$712
1
XRP Ledger XRP
$1.28
1
Dogecoin DOGE
$0.0799
1
Cardano ADA
$0.1951
1
Avalanche AVAX
$7.25
1
Polkadot DOT
$0.9448
1
Chainlink LINK
$10.93

🐋 Whale Tracker

🟢
0xf837...1a50
5m ago
In
35,415 SOL
🔴
0xbe76...ab72
30m ago
Out
3,108 ETH
🟢
0xb66a...d6ea
1h ago
In
11,111 BNB