{"id":"CVE-2026-63402","aliases":["CVE-2026-63402","GHSA-6jcc-5g8w-32mx"],"related":[],"kind":"vulnerability","state":"published","title":"i18next: Shared built-in corruption through inherited-key deepExtend recursion","summary":"i18next is an internationalization framework for JavaScript. Prior to version 26.3.4, `deepExtend` in `src/utils.js` checks property existence with the in operator and recurses into inherited built-ins reached through `Object.prototype`. An application must explicitly pass attacker-controlled resource data to `addResourceBundle(lng, ns, data, deep, overwrite)` with both `deep: true` and `overwrite: true`. Source keys such as `hasOwnProperty`, `toString` and `valueOf` can then select shared inherited built-in function objects, and a nested value can overwrite a property of those objects process-wide. For example, making `Object.prototype.hasOwnProperty.call` non-callable causes subsequent uses, including i18next internals, to throw TypeError, resulting in unrecoverable denial of service and limited integrity impact. The `__proto__`/`constructor` guard does not prevent this mechanism because the corruption target is an inherited built-in function rather than the prototype object itself. Default calls without deep merging or with overwrite falsy are unaffected, and no standard i18next backend or integration uses the vulnerable configuration. This issue is distinct from the setPath/key-walking prototype-pollution flaws in i18next-fs-backend (CVE-2026-48713) and i18next-http-middleware (CVE-2026-48714). This issue is fixed in version 26.3.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"i18next is an internationalization framework for JavaScript. Prior to version 26.3.4, `deepExtend` in `src/utils.js` checks property existence with the in operator and recurses into inherited built-ins reached through `Object.prototype`. An application must explicitly pass attacker-controlled resource data to `addResourceBundle(lng, ns, data, deep, overwrite)` with both `deep: true` and `overwrite: true`. Source keys such as `hasOwnProperty`, `toString` and `valueOf` can then select shared inherited built-in function objects, and a nested value can overwrite a property of those objects process-wide. For example, making `Object.prototype.hasOwnProperty.call` non-callable causes subsequent uses, including i18next internals, to throw TypeError, resulting in unrecoverable denial of service and limited integrity impact. The `__proto__`/`constructor` guard does not prevent this mechanism because the corruption target is an inherited built-in function rather than the prototype object itself. Default calls without deep merging or with overwrite falsy are unaffected, and no standard i18next backend or integration uses the vulnerable configuration. This issue is distinct from the setPath/key-walking prototype-pollution flaws in i18next-fs-backend (CVE-2026-48713) and i18next-http-middleware (CVE-2026-48714). This issue is fixed in version 26.3.4.","source":"cvelist"},{"lang":"en","text":"### Summary\n\n`deepExtend` in `src/utils.js` (reached via the public `addResourceBundle(lng, ns, data, deep, overwrite)` API) checked key existence with the `in` operator, which walks the prototype chain. A source key matching an inherited built-in (e.g. `hasOwnProperty`, `toString`, `valueOf`) therefore caused the function to recurse into the shared object on `Object.prototype`. With `overwrite: true`, a nested value could overwrite a property of that shared built-in — for example setting `Object.prototype.hasOwnProperty.call` to a non-callable value — corrupting it process-wide and causing an unrecoverable denial of service.\n\nThis is distinct from CVE-2026-48713 (i18next-fs-backend) and CVE-2026-48714 (i18next-http-middleware), which are prototype pollution via `setPath`/key-walking in different packages. This issue is in i18next core, via a different mechanism (the `in` operator in `deepExtend`), and is gated behind a non-default call configuration.\n\n### Details\n\n`src/utils.js` (&le; 26.3.3):\n\n```js\nexport const deepExtend = (target, source, overwrite) => {\n  for (const prop in source) {\n    if (prop !== '__proto__' && prop !== 'constructor') {\n      if (prop in target) {            // <-- walks the prototype chain\n        if (isString(target[prop]) || target[prop] instanceof String ||\n            isString(source[prop]) || source[prop] instanceof String) {\n          if (overwrite) target[prop] = source[prop];\n        } else {\n          deepExtend(target[prop], source[prop], overwrite);\n        }\n      } else {\n        target[prop] = source[prop];\n      }\n    }\n  }\n  return target;\n};\n```\n\nFor `source = { hasOwnProperty: { call: \"corrupted\" } }` and `target = {}`: `\"hasOwnProperty\" in target` is `true` (inherited from `Object.prototype`), so the code recurses with `target = Object.prototype.hasOwnProperty`. In that call, `\"call\" in target` is `true` (inherited from `Function.prototype`), `source.call` is a string, and with `overwrite: true` the assignment sets an own `call` property on `Object.prototype.hasOwnProperty` to the string `\"corrupted\"`. Every subsequent `Object.prototype.hasOwnProperty.call(...)` then throws `TypeError`, including i18next's own internals.\n\nThe existing `__proto__`/`constructor` guard does not cover this, because the corruption target is an inherited built-in *function*, not the prototype object itself.\n\n### Proof of Concept\n\n```js\nimport i18next from 'i18next';\n\nawait i18next.init({ lng: 'en', resources: { en: { translation: {} } } });\n\nconst payload = { hasOwnProperty: { call: 'corrupted' } };\ni18next.addResourceBundle('en', 'translation', payload, /* deep */ true, /* overwrite */ true);\n\n// Process-wide corruption:\nObject.prototype.hasOwnProperty.call({}, 'test'); // TypeError: ... is not a function\n```\n\n### Impact\n\nDenial of service (process-wide, unrecoverable) and limited integrity impact (a shared built-in property is set to an attacker-supplied value).\n\n**Preconditions (why severity is Medium, not High):** the application must pass attacker-controlled data into `addResourceBundle` with **both** `deep: true` and `overwrite: true`. No standard i18next backend or integration does this; it only occurs in explicit application code that merges untrusted content. The default `addResourceBundle` path (no deep merge, or `overwrite` falsy) is not affected.\n\n### Patch\n\nFixed in i18next 26.3.4 by checking existence with `Object.prototype.hasOwnProperty.call(target, prop)` instead of the `in` operator, so inherited keys are copied as plain own data instead of triggering recursion.","format":"markdown","source":"ghsa"}],"published":"2026-10-30T22:39:07.286Z","modified":"2026-11-23T21:00:47.802Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H","score":5.9,"rating":"MEDIUM"}],"cwes":["CWE-471","CWE-1321"],"affected":[{"ranges":[{"version":"< 26.3.4","status":"affected"}],"vendor":"i18next","product":"i18next","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"26.3.4"}],"ecosystem":"npm","package":"i18next","purl":"pkg:npm/i18next","source":"ghsa"}],"references":[{"url":"https://github.com/i18next/i18next/security/advisories/GHSA-6jcc-5g8w-32mx","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/i18next/i18next/commit/642137b7786d83661ec3ee53027798dc4b81d30a","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/i18next/i18next/tree/v26.3.4","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63402","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/i18next/i18next","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/i18next/i18next/releases/tag/v26.3.4","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-11-05T02:59:48.748Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-63402","url":"https://www.cve.org/CVERecord?id=CVE-2026-63402","licence":"CVE Terms of Use","modified":"2026-11-05T03:00:11.398Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6jcc-5g8w-32mx","url":"https://github.com/advisories/GHSA-6jcc-5g8w-32mx","licence":"CC-BY-4.0","modified":"2026-11-23T21:00:47.802Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-63402","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63402","licence":"Public domain","modified":"2026-11-05T03:17:30.993Z"}],"updatedAt":"2026-11-25T22:59:48.045Z","epss":{"score":0.00412,"percentile":0.37564,"date":"2026-12-01T12:00:22.000Z"}}