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

Use the configured server URL for sensitive links (#7663)

Public commit record

What the developer wrote

Authored by Nicolas Dorier

58/100 · Thin
Use the configured server URL for sensitive links (#7663)
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This commit changes BTCPay Server so that sensitive links and QR codes use the administrator-configured server URL instead of whatever URL the current request happened to arrive on. Before the fix, if an attacker could get a victim to visit the server through a different domain or path, sensitive links (API key QR codes, login codes, Lightning node config downloads, monetization checkout links, multisig setup invitations, and pending wallet transaction links) could be generated pointing to that attacker-controlled or unexpected URL. The patch makes these features consistently use the canonical server URL configured by the admin, reducing the risk of phishing, session/token leakage, or misdirected actions.

Recommended action

Treat this as a security hardening fix and include it in the next release. Review any other locations that still use Request.GetRequestBaseUrl()/GetAbsoluteRoot() for security-sensitive links to ensure they also use the configured canonical URL. Consider documenting the canonical server URL setting as a security-relevant configuration.

Security signals we found

01

Sensitive links/QR codes previously derived canonical URL from incoming HTTP request

02

Patch centralizes canonical URL via CallbackGenerator.GetRequestBaseUrl()

03

Affected flows include authentication (login codes), authorization (API keys), wallet operations (multisig, pending transactions), and service configuration (LND config)

04

New test explicitly asserts canonical URL is used across multiple features

05

Removal of AdminLoginSetsBaseUrlWhenMissing test shows behavior change: request path no longer overrides configured base URL

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.