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

Harden untrusted HTML and URL handling (#7666)

Public commit record

What the developer wrote

Authored by Nicolas Dorier

53/100 · Thin
Harden untrusted HTML and URL handling (#7666)
✓ 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 tightens how BTCPay Server handles web links and HTML that come from user or invoice data. It blocks dangerous URL schemes like javascript: and data:, and it HTML-encodes values before putting them into emails and web pages. These changes reduce the risk that an attacker could trick an administrator or customer into running malicious code through invoice metadata, subscription redirect URLs, email notifications, or wallet labels.

Recommended action

Treat this as a security hardening patch addressing cross-site scripting and unsafe-redirect risks. Review whether any other user-supplied URLs or HTML are still rendered unencoded, and consider applying the same GetSafeHttpUrl/IsSafeRedirectUrl pattern to any remaining redirect or link fields. No immediate emergency response is indicated, but deployment should follow normal security-update prioritization.

Security signals we found

01

URL scheme allowlisting for invoice orderUrl and redirectUrl

02

Validation of subscription SuccessRedirectUrl to http/https absolute URLs

03

HTML encoding added to email notification body fields

04

Raw HTML rendering removed from PointOfSale error status message

05

HTML encoding added to webhook tooltip error message

06

Scheme allowlisting for wallet label custom attachment links

07

UriAttribute default restricted to http/https and whitespace rejected

Risk score

Why this scored 68/100

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