AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 59 Bitcoin

Merge pull request #11282 from lightningnetwork/elle-base-branch-payment-service

Public commit record

What the developer wrote

Authored by Olaoluwa Osuntokun

73/100 · Adequate
Merge pull request #11282 from lightningnetwork/elle-base-branch-payment-service

multi: add switchrpc external HTLC dispatch subsystem
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This is a large feature merge for LND that adds a new optional RPC subsystem called switchrpc. It lets an external program hand a pre-built onion packet to LND for direct dispatch over a Lightning channel, instead of LND doing its own pathfinding. The change is opt-in and compiled only when the 'switchrpc' build tag is used. It also reworks how in-flight payment attempts are stored so the same attempt ID cannot be used twice, preventing accidental duplicate payments when an external caller retries after a network timeout. The release notes explicitly warn that running the local router and an external router at the same time is unsafe and can cause loss of funds.

Recommended action

Treat this as a significant new attack surface, not as a routine bug fix. If switchrpc is enabled, restrict RPC access strictly to the trusted external router, run only one controller at a time, and monitor for misconfiguration that could enable both local and external routing concurrently. Review the switchrpc ACL/auth bindings before production use. No immediate patch is required because the feature is opt-in and build-tagged, but operators should understand the documented funds-loss risk.

Security signals we found

01

New optional RPC surface (switchrpc) that accepts externally crafted onion packets and directly dispatches HTLCs

02

Idempotency/deduplication added via InitAttempt durable write-ahead log and ErrPaymentIDAlreadyExists

03

Startup orphan cleanup fails half-open or pre-commit attempts to avoid hangs

04

External lifecycle marker prevents local-mode binary from deleting remote-controller attempt state

05

Release notes warn: concurrent local + external router usage leads to undefined behavior and potential loss of funds

06

Build tag gated: switchrpc is not compiled by default

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 8/15
Affected reach 10/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.