Experimental switchLocalePathLinkSSR causing possible XSS vector #3042
Labels
❗ p4-important
Priority 4: bugs that violate documented behavior, or significantly impact perf
v8
v9
Environment
Reproduction
Minimal Repro: https://github.com/KilianSSL/i18n-ssr-repro
Disable javascript, to best review the SSR response.
<SwitchLocalePathLink>
http://localhost:3000/fr/%22%3Exss/
the
">xss/
portion of the URL will cause<SwitchLocalePathLink>
to output invalid HTML that will render whatever comes after">xss/
.Describe the bug
The bug seems to be caused by
<SwitchLocalePathLink>
defaulting to the current URL parameters, if not set otherwise viasetI18nParams
. The parameters are not being sanitized before they're used in the generated HTML.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: