Skip to content

fix: avoid XSS by escaping error messages in demo page - #8176

Open
dw-kihara wants to merge 3 commits into
video-dev:masterfrom
dw-kihara:fix/xss-on-demo-page-2
Open

dw-kihara wants to merge 3 commits into
video-dev:masterfrom
dw-kihara:fix/xss-on-demo-page-2

Conversation

@dw-kihara

@dw-kihara dw-kihara commented Nov 16, 2026 •

Copy link
Copy Markdown

This PR will...

Fix XSS by escaping error messages in demo page.

Why is this Pull Request needed?

#6538 addressed the XSS by validating the stream URL. Unfortunately, that fix cannot prevent a valid but malicious URL like https://example.invalid/<script>alert("xss")</script>. Additionally, a malicious response might cause XSS in the error message.

Example: https://hlsjs-dev.video-dev.org/demo/?src=https://example.invalid/%3Cscript%3Ealert(%22xss%22)%3C/script%3E

Are there any points in the code the reviewer needs to double check?

Nothing specific.

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@dw-kihara dw-kihara changed the title fix: avoid XSS by escaping stream URL in demo page fix: avoid XSS by escaping error messages in demo page Nov 16, 2026
@dw-kihara
dw-kihara force-pushed the fix/xss-on-demo-page-2 branch from 3e2ee81 to 47c7c4d Compare November 16, 2026 07:27

This branch has not been deployed

No deployments
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