QID 983937

QID 983937: Nodejs (npm) Security Update for i18next (GHSA-cmh5-qc8w-xvcq)

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 ``` 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: ``` &lt;script&gt;alert(1)&lt;&#x2F;script&gt; Johnson ``` This is supposed to be the default. However, if `escapeValue` is not included, the result is the unescaped string: ``` <SCRIPT>alert(1)</SCRIPT> Johnson ``` ## Recommendation Update to version 3.4.4 or later.

Successful exploitation of this vulnerability may affect the confidentiality, integrity, and availability of the targeted user.

  • CVSS V3 rated as High - 6.1 severity.
  • CVSS V2 rated as Medium - 4.3 severity.
  • Solution
    Customers are advised to refer to GHSA-cmh5-qc8w-xvcq for updates pertaining to this vulnerability.
    Vendor References

    CVEs related to QID 983937

    Software Advisories
    Advisory ID Software Component Link
    GHSA-cmh5-qc8w-xvcq i18next URL Logo github.com/advisories/GHSA-cmh5-qc8w-xvcq