Skip to content
CORS Write-up Intermediate

Stealing Bitcoin with Cross-Site Request Forgery (Ride the Lightning + Umbrel)

Ride The Lightning (RTL) set the Access-Control-Allow-Origin header to *, allowing any website to make cross-origin requests to a user's local RTL instance. An attacker could use known default credentials to obtain a session token and instruct the wallet to send funds to an attacker-controlled address.

initblog.com

Published on initblog.com

Ride The Lightning (RTL) is a web application for managing Bitcoin Lightning Network operations. It is integrated into many popular Bitcoin full-node implementations, such as Umbrel.

initstring, on initblog.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 RTL application set the CORS header Access-Control-Allow-Origin to *, which permitted any origin to read responses and send authenticated requests.

Impact

An attacker could steal any funds secured by the node's wallet, and the transaction would be irreversible once included in a block.

What the attacker needed

Victim visits a malicious website; RTL is installed on the same local network; RTL uses default or known password; victim's browser can reach the RTL host

The fix

The CORS configuration was fixed to block the exploit, and users should upgrade to RTL v0.11.0-rc3 or later.

How it was found

  1. The malicious website instructs the browser to send a POST request with default credentials to the local RTL URL.
  2. The browser sends a CORS preflight OPTIONS request to check if the cross-origin request is allowed.
  3. RTL responds with Access-Control-Allow-Origin: *, so the browser permits the request.
  4. The POST request is sent and RTL returns a session token.
  5. The malicious site uses the token to send another POST request instructing RTL to send funds to an attacker-controlled address.

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.

Cross-site request forgery (CSRF) is when a malicious website makes your browser send commands to another site you are logged into. Here, a misconfigured security header let any website talk to the local Bitcoin wallet app, and because the app used a default password, the attacker could move funds.

What is CORS?

A permissive cross-origin policy lets another site read responses with the user's credentials.

Similar reports

View all

Same bug class and techniques, clearest first.

CORS misconfiguration

The lesson behind this report.

A permissive cross-origin policy lets another site read responses with the user's credentials.