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

Validate support URL scheme to prevent stored script injection (#7537)

Public commit record

What the developer wrote

Authored by Chukwuleta Tobechi

85/100 · Strong
Validate support URL scheme to prevent stored script injection (#7537)

* Validate support URL scheme to prevent stored script injection

* make get request readable
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a stored cross-site scripting (XSS) risk in BTCPay Server's store settings. Merchants can set a 'Support URL' that is shown to customers during checkout. Before this fix, an attacker with access to store settings could enter a URL using the 'javascript:' scheme, such as 'javascript:document.body.dataset.pwned=1'. When a customer later clicked the support link, the browser would run the attacker's JavaScript in the checkout page. The patch now rejects any support URL whose scheme is not http, https, or mailto, both in the web UI and in the Greenfield API.

Recommended action

Upgrade to a BTCPay Server release that includes this commit. If self-hosting from source, apply the patch and verify that the Support URL field rejects javascript:, data:, and other non-http/https/mailto schemes in both the store settings UI and the Greenfield API.

Security signals we found

01

Stored XSS via javascript: URI in SupportUrl

02

Missing scheme validation on user-supplied URL

03

Greenfield API and UI controller both patched

04

Test case explicitly uses javascript: payload

Risk score

Why this scored 66/100

Our methodology →
Potential impact 18/30
Exploitability 16/25
Stealth signal 10/15
Affected reach 10/15
Confidence 8/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.