Home / Blog / LNbits Shutdown: A Layer 7 Attack Lesson for Wallet Ops

LNbits Shutdown: A Layer 7 Attack Lesson for Wallet Ops

At 12:33 UTC yesterday the LNbits team asked operators to disable the Paywall extension. Eighty minutes later it told every self-hosted Lightning wallet server to shut down entirely. One operator had already lost 2,285,545 satoshis — roughly 0.023 BTC — to accounts created and drained before the first warning went out. Patches are still 24 to 48 hours away, and the project's own cloud service at my.lnbits.com has been taken offline as well.

We usually measure our work in millions of packets per second; this one is worth studying for the opposite reason. It was a layer 7 attack that needed no botnet, no amplification and no world record — just a script, a logic flaw and a payment endpoint that trusted its own input. The attackers automated the boring parts and let the flaw do the rest.

Automated account creation is the new SYN flood

The exploit window ran from 09:22 to 14:00 UTC, more than three hours before the project's first public warning at 12:33. Detection came from an operator's loss report on X, not from telemetry. That gap is the real story. Mass registration is a connection flood with a business model: thousands of cheap accounts, each one probing an extension endpoint for a missing authorization check. Once the flaw is found, the drain is scripted. No browser emulation, no CAPTCHA bypass, no TLS fingerprint tricks — nothing stood in the way. The shutdown notice followed hours later, and the extension responsible still had not been named publicly.

Automated account creation script draining a self-hosted Bitcoin Lightning wallet in a layer 7 attack
Thousands of registrations, one missing authorization check.

Rate limits, tenant isolation, and the boring defenses

A layer 7 attack of this shape dies at the edge if you let it. The controls that matter are unglamorous and well understood:

  • Per-tenant rate limits on registration, login and withdrawal endpoints — not just per-IP, because addresses and user-agent strings rotate freely and JA3 fingerprints are cheap to fake.
  • L7 flood rules on the auth path: HTTP POST flood and HTTP GET flood thresholds, Slowloris and connection flood protection at the edge, TLS flood and HTTP/2 Rapid Reset handled before the application ever sees them.
  • Out-of-band anomaly detection on balance deltas rather than request counts. Request volume looked normal on the affected server. The ledger did not.

None of this requires a scrubbing center. It requires someone deciding, before launch, that a wallet endpoint is a high-value target and not a hobby page.

Rate limiting and tenant isolation blocking an HTTP POST flood against a self-hosted Lightning wallet API
Per-tenant limits beat per-IP guesswork every time.

What we would have kept running

A 24-48 hour patch window is an eternity in production. Extensions need feature flags and a kill switch, so Paywall can be disabled without taking the whole server down. Tenant isolation has to be real: one operator's extension bug should not become every operator's loss. And self-hosted financial services deserve the same continuous-scanning assumptions we apply to any public endpoint — the boring parts get automated first, and the boring parts are account creation, session handling and withdrawal logic. We have written before about what sustained pressure looks like (see achievements); this is the same idea with a smaller packet count and a bigger invoice.

The lesson is not that Lightning is broken. It is that a wallet service is a cash register with an API, and cash registers get robbed in minutes when the lock is a missing check. Rate-limit the endpoints, isolate the tenants, watch the money instead of the traffic — and patch before the shutdown notice. If you want to see how your own stack behaves under load before someone else tests it for you, our free stress test is one click away at /contact.