Cross-Site Scripting in i18next
Moderate severity
GitHub Reviewed
Published
Jul 24, 2018
to the GitHub Advisory Database
•
Updated Sep 8, 2023
Description
Published to the GitHub Advisory Database
Jul 24, 2018
Reviewed
Jun 16, 2020
Last updated
Sep 8, 2023
Affected versions of
i18next
may fail to sanitize user input when certain configuration options are used. When using the.init
method, passing interpolation options without passing anescapeValue
will default toundefined
rather than the assumedtrue
.Proof of Concept
When
escapeValue
is explicitly passed, the result oftest
is:This is supposed to be the default. However, if
escapeValue
is not included, the result is the unescaped string:Recommendation
Update to version 3.4.4 or later.
References