Advisory

GHSA-f89g-whpf-6q9m

Also known as: CVE-2017-16008

Summary

Cross-Site Scripting in i18next

Details

Affected versions of i18next allow untrusted user input to be injected into dictionary key names, resulting in a cross-site scripting vulnerability.

Proof of Concept

var init = i18n.init({debug: true}, function(){
  var test = i18n.t('__firstName__ __lastName__', {
        escapeInterpolation: true,
        firstName: '__lastNameHTML__',
        lastName: '<script>',
  });
  console.log(test);
});
// equals "<script> &lt;script&gt;"

Recommendation

Update to version 1.10.3 or later.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2018-11-09 17:46 UTC
Modified
2023-11-08 03:58 UTC

Affected packages and fixes

i18next

npm · All systems

Affected

  • introduced 0, fixed 1.10.3 (semver)

Fixed versions

1.10.3

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences