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

Tighten HTML sanitizer defaults (#7726)

Public commit record

What the developer wrote

Authored by Nicolas Dorier

53/100 · Thin
Tighten HTML sanitizer defaults (#7726)
✓ 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 the HTML sanitizer used in BTCPay Server. It splits the previous single sanitizer into a stricter default one and a separate 'rich text' sanitizer for user-provided descriptions. The rich-text sanitizer now restricts CSS, strips dangerous iframe attributes, only allows same-origin iframe behavior for a small list of trusted video hosts, and blocks things like background-image tracking pixels and arbitrary iframe permissions. Several public pages that render user-provided descriptions are switched to the new rich-text sanitizer. The commit also updates the bundled Summernote rich-text editor from version 0.8.18 to 0.9.1.

Recommended action

Review the new sanitizer rules against your threat model, especially the trusted iframe host list and allowed CSS properties. Ensure the Summernote 0.9.1 upgrade does not introduce unrelated UI or security regressions. Run the added HtmlSanitizerTests and confirm all user-provided rich-text fields use RawRichText rather than the old Raw helper.

Security signals we found

01

HTML sanitizer policy hardening

02

New dedicated rich-text sanitizer with stricter iframe sandboxing

03

Trusted-host allowlist for iframe same-origin relaxation

04

CSS property allowlist blocking background-image and position

05

iframe allow attribute validation and referrerpolicy enforcement

06

javascript: scheme rejection for image src

07

Multiple public views moved to richer but still sanitized rendering

08

Summernote editor dependency update 0.8.18 -> 0.9.1

Risk score

Why this scored 66/100

Our methodology →
Potential impact 18/30
Exploitability 14/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.