Skip to content

rtl: RTL gets lnd's admin macaroon and an unrestricted clightning rune instead of scoped credentials #261

Closed

Description

@ostermayer

Follow-up to #151. #258 stops RTL from sending its credentials to another server on a backend's port. RTL itself still gets full admin access to both backends.

What it gets now

  • lnd: rtl-copy-macaroon copies lnd's admin.macaroon for RTL (modules/rtl.nix:289 on master f91deeaf).
  • clightning: rtl-create-clnrest-rune-file copies clnrest's admin-rune, which has no restrictions (modules/rtl.nix:299).

BTCPay Server and charge-lnd get their own macaroon from services.lnd.macaroons, with only the permissions they use. RTL doesn't.

Why it matters

Whoever controls the RTL process has full control of its backends. So does anyone who exploits a bug in RTL or Node before login, like #121. The admin macaroon also lets its holder bake new macaroons with any permission.

Fix

  • Add RTL to services.lnd.macaroons with the permissions RTL's features use, and point macaroonPath at that macaroon.
  • Create a rune for RTL with restrictions that match the clightning methods it calls.

RTL opens and closes channels and sends payments and on-chain funds, so it needs write access. The work is to find which lnd and clightning endpoints RTL calls (backend/controllers/lnd and backend/controllers/cln in RTL's source) and drop the rest, for example macaroon management.

Activity

  1. added
    type: security
    area: modules
    on Nov 18, 2026
  2. added 4 commits that reference this issue on Nov 20, 2026
    882f2e7
    8528361
    8f82639
    07069f9
  3. added a commit that references this issue on Nov 21, 2026
    eb790ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: modulestype: security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions