Repository navigation
btcpayserver: use a neutral SSRF exception example and test the internal Lightning path - #144
Merged
Merged
Conversation
…nal Lightning path The docs and the 0.1.2 message showed 127.0.0.1:8080 as an exception, which is lnd's REST port. Copying it would let anyone who can set a webhook, a notification URL or a Lightning address make BTCPay send requests to lnd. Use a LAN host instead and say that exceptions stay narrow, never cover node service ports, and that a hostname trusts every address it resolves to. The btcpayserver test curls lnd itself, so BTCPay's own HTTP client never ran against the internal node. The regtest test now creates the first admin over Greenfield and reads the Lightning node info and the health endpoint, which fails if the SSRF protection ever covers the Lightning client.
seberm
approved these changes
Oct 25, 2026
seberm
force-pushed
the
btcpay-ssrf-docs-test
branch
from
October 25, 2026 08:45
4ddff0e to
dce7a15
Compare
seberm
enabled auto-merge
October 25, 2026 08:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #125, as asked there.
The docs and the 0.1.2 message showed
127.0.0.1:8080as anssrfexceptionsexample, but that is lnd's REST port. Copying it would let anyone who can set a webhook, a notification URL or a Lightning address make BTCPay send requests to lnd. Both places now show192.168.1.50:8443;10.8.0.0/24, anddocs/configuration.mdsays that exceptions stay narrow, never cover the ports of node services, and that a hostname entry trusts every address it resolves to.The
btcpayservertest curls lnd itself, so BTCPay's own HTTP client never ran against the internal node and "the Lightning node is unaffected" was untested. Theregtesttest now creates the first admin over Greenfield, readsGET /api/v1/server/lightning/BTC/infowith that account and checks the block height against the mined blocks, then waits forGET /api/v1/healthto reportsynchronized: true. The login is tried first, so a rerun of the test in a debug VM doesn't fail on the second creation.netnsRegtestpassed twice on a KVM host, once before and once after the rerun guard. The Lightning info answered in under a second with the right height and health went synchronized after about 55 seconds.DeepSeek V4.1 Flash 1017 run at max reasoning timed out without a verdict. GLM 5.3 run at max reasoning reviewed the tree at 4ddff0e and found nothing in the files this change touches. Codex (GPT-6 Astra, xhigh) read the diff and found one thing, a rerun of the test would fail on the second admin creation, and that is fixed.