Skip to content

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

Open
tomaioo wants to merge 2 commits intophcode-dev:mainfrom
tomaioo:fix/security/dom-based-xss-via-unsanitized-query-para
Open

fix(security): 2 improvements across 2 files#2833
tomaioo wants to merge 2 commits intophcode-dev:mainfrom
tomaioo:fix/security/dom-based-xss-via-unsanitized-query-para

Conversation

@tomaioo
Copy link
Copy Markdown

@tomaioo tomaioo commented Apr 21, 2026

Summary

fix(security): 2 improvements across 2 files

Problem

Severity: High | File: src-node/www/phoenix-splash/error.html:L11

The page reads mainHeading and mainSpan from URL query parameters, decodes them, and assigns them directly to innerHTML. An attacker can craft a URL containing HTML/JS payloads that execute in the page context.

Solution

Avoid innerHTML for untrusted data. Use textContent/innerText instead, or sanitize with a robust HTML sanitizer (e.g., DOMPurify) if HTML rendering is required.

Changes

  • src-node/www/phoenix-splash/error.html (modified)
  • src/assets/phoenix-splash/live-preview-error.html (modified)

tomaioo added 2 commits April 21, 2026 11:12
- Security: DOM-based XSS via unsanitized query parameters
- Security: DOM-based XSS in live preview error page translations

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Security: DOM-based XSS via unsanitized query parameters
- Security: DOM-based XSS in live preview error page translations

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant