Summary
joi: object().rename() with a template target can set the validated object's prototype
Workarounds
- Replace the template rename target with a static string target.
- Keep the template but make the capture unable to produce
__proto__, using a negative lookahead:.rename(/^x-(?!__proto__$)(.+)$/, Joi.x('{#1}'), { multiple: true }) - Drop { multiple: true } from the rename, which stops the rename before the assignment.
Impact
Applications are affected only if a schema renames keys with a regular-expression source and a Joi.expression() / Joi.x() target that interpolates the pattern's own match data, combined with { multiple: true }, for example .rename(/^x-(.+)$/, Joi.x('{#1}'), { multiple: true }). Because the target is rendered from the matched input key, an attacker who controls input keys can send x-__proto__ with an object value and make the rename target render as __proto__, which sets the prototype of the object joi returns instead of creating a key on it. The global Object.prototype is not modified, so the effect is confined to the object returned by that one validate() call.
Schemas using a static string rename target are not affected, and neither are schemas left on the default { multiple: false }.
CVE-2026-84367 has a CVSS score of 3.7 (Low). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (17.13.5, 18.2.4); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Versions 17.13.5 and 18.2.4 have been released to address the issue.
Frequently Asked Questions
- What is CVE-2026-84367? CVE-2026-84367 is a low-severity security vulnerability in joi (npm), affecting versions >= 16.0.0, < 17.13.5. It is fixed in 17.13.5, 18.2.4.
- How severe is CVE-2026-84367? CVE-2026-84367 has a CVSS score of 3.7 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of joi are affected by CVE-2026-84367? joi (npm) versions >= 16.0.0, < 17.13.5 is affected.
- Is there a fix for CVE-2026-84367? Yes. CVE-2026-84367 is fixed in 17.13.5, 18.2.4. Upgrade to this version or later.
- Is CVE-2026-84367 exploitable, and should I be worried? Whether CVE-2026-84367 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-84367 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-84367?
- Upgrade
joito 17.13.5 or later - Upgrade
joito 18.2.4 or later
- Upgrade