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

Encode payjoin errors in wallet status messages (#7567)

Public commit record

What the developer wrote

Authored by Nicolas Dorier

58/100 · Thin
Encode payjoin errors in wallet status messages (#7567)
✓ 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 fixes a potential cross-site scripting (XSS) issue in BTCPay Server's wallet status messages. When a payjoin transaction fails, the server shows a warning message that includes an error string. Previously, that error string was inserted directly into the HTML of the status message, so if an attacker could influence the error text to contain malicious code (for example, through a script tag), it could run in the administrator's browser. The change now encodes the error text so that any HTML-like characters are displayed as plain text instead of being interpreted as code.

Recommended action

Review whether other status messages in the same controller or elsewhere concatenate raw strings into Html properties. Ensure all dynamic content inserted into StatusMessageModel.Html is encoded unless it is explicitly known-safe HTML. Consider adding a code-analysis rule or helper that requires encoding for Html status messages.

Security signals we found

01

HTML content constructed from an external error string without encoding

02

Addition of HtmlEncoder.Default.Encode around user-influenced or third-party error text

03

Status message rendered as raw Html in the UI

04

Payjoin error path where attacker-controlled or relayed error content may reach the admin UI

Risk score

Why this scored 36/100

Our methodology →
Potential impact 8/30
Exploitability 7/25
Stealth signal 6/15
Affected reach 5/15
Confidence 7/10
Evidence quality 3/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.