Skip to content

fix(security): 2 improvements across 2 files#6194

Open
tomaioo wants to merge 2 commits into
frappe:developfrom
tomaioo:fix/security/stored-reflected-xss-via-unsanitized-htm
Open

fix(security): 2 improvements across 2 files#6194
tomaioo wants to merge 2 commits into
frappe:developfrom
tomaioo:fix/security/stored-reflected-xss-via-unsanitized-htm

Conversation

@tomaioo
Copy link
Copy Markdown

@tomaioo tomaioo commented Apr 20, 2026

Summary

fix(security): 2 improvements across 2 files

Problem

Severity: High | File: dashboard/src/components/CustomToast.vue:L22

The component renders the html prop using v-html without sanitization. If this prop can contain user-controlled or server-returned content, attackers can inject arbitrary HTML/JavaScript, leading to account takeover or data exfiltration in the dashboard context.

Solution

Avoid v-html for untrusted data. Render as plain text ({{ html }}) or sanitize strictly with a vetted sanitizer (e.g., DOMPurify) before rendering.

Changes

  • dashboard/src/components/CustomToast.vue (modified)
  • dashboard/src/components/AlertBanner.vue (modified)

tomaioo added 2 commits April 20, 2026 05:14
- Security: Stored/Reflected XSS via unsanitized HTML in toast content
- Security: Unsanitized HTML rendering in alert title

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Security: Stored/Reflected XSS via unsanitized HTML in toast content
- Security: Unsanitized HTML rendering in alert title

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
@tomaioo tomaioo requested a review from siduck as a code owner April 20, 2026 12:14
@siduck siduck requested a review from ssiyad April 20, 2026 16:39
Copy link
Copy Markdown
Member

@ssiyad ssiyad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may break existing HTML based content rendering. Can you please update this to use DOMPurify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants