Where
-Infinity
0
Severity
6.1
XSS
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

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 an escapeValue will default to undefined rather than the assumed true.

Proof of Concept

js var init = i18n.init({ interpolation: { prefix: "", suffix: "", escapeValue: true } }, function(){ var test = i18n.t('firstName lastName', { firstName: 'Bob', lastName: '["foo","bar"]', }); console.log(test); }); When escapeValue is explicitly passed, the result of test is:

html <script>alert(1)</script> Johnson

This is supposed to be the default. However, if escapeValue is not included, the result is the unescaped string: html <script>alert(1)</script> Johnson

Recommendation

Update to version 3.4.4 or later.

1 / 2
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203