Skip to content
Access control Write-up Intermediate

How I Found a Critical Authentication Bypass in a Lightning Network SDK (CVSS 9.8)

The SDK shipped a default validator that always returned true, so any unsigned webhook was accepted. An attacker who could reach the signing endpoint could get the victim's Lightning key to sign arbitrary messages, potentially draining channels.

infosecwriteups.com

Published on infosecwriteups.com

This is my story of finding a CVSS 9.8 Critical authentication bypass — and everything I learned along the way.

Hacker MD, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The SDK provided a default validator that unconditionally returned true instead of verifying an HMAC signature.

Impact

An attacker could obtain valid signatures for arbitrary messages, which could allow forging commitment transactions and draining Lightning channels; the report claims complete channel drain but does not demonstrate the final on-chain step.

What the attacker needed

Network access to signing endpoint; SDK uses default PositiveValidator

The fix

The SDK should remove the default-accept validator and require HMAC-SHA256 verification with constant-time comparison, rejecting requests with missing signatures.

How it was found

  1. Find the signing endpoint that uses the SDK.
  2. Send an unsigned HTTP request with a chosen nonce or signing job.
  3. Observe that the server accepts the request without authentication.
  4. Collect the returned signatures or preimages.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A remote signing server holds a victim's private keys and signs transactions when it receives a webhook. The SDK included a default validator that always said 'yes' to every request, so no password or signature was needed. An attacker could send their own request and get the server to sign whatever they wanted.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.