Skip to content

fix: prevent XSS via event title in inline script contexts#1260

Merged
daveearley merged 1 commit into
mainfrom
fix/xss-title-inline-script
Jul 7, 2026
Merged

fix: prevent XSS via event title in inline script contexts#1260
daveearley merged 1 commit into
mainfrom
fix/xss-title-inline-script

Conversation

@daveearley

Copy link
Copy Markdown
Contributor

Escapes user-controlled data before embedding it in inline <script> tags (rehydrated state, JSON-LD, env vars) so an event title can't break out of the script context. Uses function replacements in the SSR template so $ sequences in the data aren't interpreted, and strips control characters from titles as defence-in-depth.

Thanks to @0xh3lix for the report.

@railway-app
railway-app Bot temporarily deployed to Hi.Events / Hi.Events-pr-1260 July 7, 2026 21:49 Destroyed
@daveearley
daveearley merged commit 1e36b07 into main Jul 7, 2026
8 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant