{"id":"CVE-2017-16010","aliases":["EUVD-2018-0260","GHSA-cmh5-qc8w-xvcq"],"status":"published","title":"Cross-Site Scripting in i18next","description":"i18next is a language translation framework. When using the .init method, passing interpolation options without passing an escapeValue will default to undefined rather than the assumed true. This can result in a cross-site scripting vulnerability because user input is assumed to be escaped, but is not. This vulnerability affects i18next 2.0.0 and later.","severity":{"version":"3.0","score":6.1,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-07","score":0.00982,"percentile":0.625,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2018-05-29T20:00:00Z","modified":"2026-10-20T10:48:17Z","fixes":[{"ecosystem":"npm","package":"i18next","fixed_in":["3.4.4"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"i18next","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"3.4.4"}]}]},{"source":"osv","ecosystem":"npm","package":"i18next","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"3.4.4"}]}]}],"products":[{"vendor":"hackerone","product":"i18next node module"},{"vendor":"i18next","product":"i18next"}],"references":[{"url":"https://github.com/i18next/i18next/pull/826","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://nodesecurity.io/advisories/326","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2017-16010","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-cmh5-qc8w-xvcq","tags":["advisory"]},{"url":"https://www.npmjs.com/advisories/326","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2017-16010","description":"i18next is a language translation framework. When using the .init method, passing interpolation options without passing an escapeValue will default to undefined rather than the assumed true. This can result in a cross-site scripting vulnerability because user input is assumed to be escaped, but is not. This vulnerability affects i18next 2.0.0 and later.","status":"published","published":"2018-05-29T20:00:00Z","modified":"2024-09-16T18:38:55.446Z","cwes":["CWE-79"],"updated_at":"2026-11-02T14:33:21.142987Z"}],"euvd":[{"id":"EUVD-2018-0260","description":"i18next is a language translation framework. When using the .init method, passing interpolation options without passing an escapeValue will default to undefined rather than the assumed true. This can result in a cross-site scripting vulnerability because user input is assumed to be escaped, but is not. This vulnerability affects i18next 2.0.0 and later.","status":"published","published":"2018-05-29T20:00:00Z","modified":"2024-09-16T18:38:55Z","updated_at":"2026-11-03T00:55:30.637715Z"}],"ghsa":[{"id":"GHSA-cmh5-qc8w-xvcq","title":"Cross-Site Scripting in i18next","description":"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`. \n\n## Proof of Concept\n\n```js\nvar init = i18n.init({\n  interpolation: {\n    prefix: \"__\",\n    suffix: \"__\",\n    escapeValue: true\n  }\n}, function(){\n  var test = i18n.t('__firstName__ __lastName__', {\n        firstName: 'Bob',\n        lastName: '[\"foo\",\"bar\"]',\n  });\n  console.log(test);\n});\n```\nWhen `escapeValue` is explicitly passed, the result of `test` is: \n\n```html\n\u0026lt;script\u0026gt;alert(1)\u0026lt;\u0026#x2F;script\u0026gt; Johnson\n```\n\nThis is supposed to be the default. However, if `escapeValue` is not included, the result is the unescaped string: \n \n```html\n\u003cscript\u003ealert(1)\u003c/script\u003e Johnson\n```\n\n\n## Recommendation\n\nUpdate to version 3.4.4 or later.","status":"published","published":"2018-07-24T19:58:33Z","modified":"2023-09-08T23:58:17Z","cvss":[{"version":"3.0","score":6.1,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:37:03.916765Z"}],"nvd":[{"id":"CVE-2017-16010","description":"i18next is a language translation framework. When using the .init method, passing interpolation options without passing an escapeValue will default to undefined rather than the assumed true. This can result in a cross-site scripting vulnerability because user input is assumed to be escaped, but is not. This vulnerability affects i18next 2.0.0 and later.","status":"published","published":"2018-05-29T20:29:02.19Z","modified":"2026-06-17T01:08:38.35Z","cvss":[{"version":"3.0","score":6.1,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:04:17.638656Z"}],"osv":[{"id":"CVE-2017-16010","description":"i18next is a language translation framework. When using the .init method, passing interpolation options without passing an escapeValue will default to undefined rather than the assumed true. This can result in a cross-site scripting vulnerability because user input is assumed to be escaped, but is not. This vulnerability affects i18next 2.0.0 and later.","status":"published","published":"2018-05-29T20:29:02.19Z","modified":"2026-10-20T10:48:17.671928688Z","cvss":[{"version":"3.0","score":6.1,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:04.853379Z"},{"id":"GHSA-cmh5-qc8w-xvcq","title":"Cross-Site Scripting in i18next","description":"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`. \n\n## Proof of Concept\n\n```js\nvar init = i18n.init({\n  interpolation: {\n    prefix: \"__\",\n    suffix: \"__\",\n    escapeValue: true\n  }\n}, function(){\n  var test = i18n.t('__firstName__ __lastName__', {\n        firstName: 'Bob',\n        lastName: '[\"foo\",\"bar\"]',\n  });\n  console.log(test);\n});\n```\nWhen `escapeValue` is explicitly passed, the result of `test` is: \n\n```html\n\u0026lt;script\u0026gt;alert(1)\u0026lt;\u0026#x2F;script\u0026gt; Johnson\n```\n\nThis is supposed to be the default. However, if `escapeValue` is not included, the result is the unescaped string: \n \n```html\n\u003cscript\u003ealert(1)\u003c/script\u003e Johnson\n```\n\n\n## Recommendation\n\nUpdate to version 3.4.4 or later.","status":"published","published":"2018-07-24T19:58:33Z","modified":"2023-11-08T03:58:59.586536Z","cvss":[{"version":"3.0","score":6.1,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:45.28161Z"}]}}
