Escape rendered markdown preview HTML #52

Closed
opened 2026-08-05 23:47:02 +00:00 by rockachopa · 0 comments
Member

Reproduction

  1. Open the dashboard markdown widget.
  2. Enter <img src=x onerror=alert(document.domain)>.
  3. The preview assigns transformed user input directly to innerHTML, preserving the executable tag.

Expected

Markdown formatting is rendered, but raw HTML and attribute payloads remain escaped. Add a behavioral regression test for the renderer.

Evidence

frontend/index.html builds html from the raw textarea value and inserts it at line 337 without escaping the formatted branch.

## Reproduction 1. Open the dashboard markdown widget. 2. Enter `<img src=x onerror=alert(document.domain)>`. 3. The preview assigns transformed user input directly to `innerHTML`, preserving the executable tag. ## Expected Markdown formatting is rendered, but raw HTML and attribute payloads remain escaped. Add a behavioral regression test for the renderer. ## Evidence `frontend/index.html` builds `html` from the raw textarea value and inserts it at line 337 without escaping the formatted branch.
timmy was assigned by rockachopa 2026-08-05 23:47:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#52