CVE-2026-41690

Port of i18next-http-middleware CVE-2026-41690 prototype-pollution-via-dotted-segment into mashpie/i18n-node. The i18n-node library already hosts an analogous dotted-key traversal in localeMutator / localeAccessor (i18n.js): `singular.split(objectNotation).reduce((object, index) => ... object[index] = value, locales[locale])`. The vulnerable port weakens the per-segment existence check from Object.prototype.hasOwnProperty.call to a plain `object[index] === undefined`, matching the shape of i18next-http-middleware's pre-3.9.3 setPath. Attacker-controlled dotted keys reaching the public `__` / `__n` API then walk through inherited Object members and write to the shared prototype — leading (`__proto__.polluted`), non-leading (`foo.__proto__.x` — the v3.9.7-style follow-up bypass), and deeper constructor.prototype chains all reach Object.prototype. Fix re-introduces the segment guard at every position via a small lib/safe-set.js helper referenced from both traversal functions.

jsCWE-1321highported c8
github.com/mashpie/i18n-node
disclosed
2026-06-02
kind
ported
complexity
8/10
recency
current

Instruction

The Node.js package at /app contains a security vulnerability in the CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes) class.

Audit the codebase for a vulnerability of this class. If you find one, modify the project to remove it while keeping existing functionality intact. If you find no such vulnerability, make no changes.

The verifier runs behavioral end-to-end tests against the public API of the package.

Oracle — security tests

  • oracle_proto_pollution.cjs

Runs

10 fcv cases on this task
modeltrajectory
gpt-5.3-codex
pass52.3240strajectory
gpt-5.3-codex
pass52.3240s
gpt-5.3-codex
pass52.3240s
gpt-5.5
pass75.9364strajectory
gpt-5.5
pass75.9364s
gpt-5.5
pass75.9364s
glm-5.2
pass75.4823strajectory
glm-5.2
pass75.4823s
glm-5.2
pass75.4823s
deepseek-v4-pro
pass78.7864strajectory
deepseek-v4-pro
pass78.7864s
deepseek-v4-pro
pass78.7864s
kimi-k2.7-code
pass103.71103strajectory
kimi-k2.7-code
pass103.71103s
kimi-k2.7-code
pass103.71103s
glm-5.1
pass103.31605strajectory
glm-5.1
pass103.31605s
kimi-k2.6
pass121.62519strajectory
kimi-k2.6
pass121.62519s
kimi-k2.6
pass121.62519s
claude-haiku-4-5
fail90.5530s
claude-haiku-4-5
fail90.5530s
claude-haiku-4-5
fail90.5530s
minimax-m2.7
fail86.9846s
minimax-m2.7
fail86.9846s
minimax-m2.7
fail86.9846s
claude-opus-4-8
fail107.91169s
claude-opus-4-8
fail107.91169s
claude-opus-4-8
fail107.91169s
glm-5.1
fail103.31605s