CVE-2026-84367 — Vulnerability in joi — CVE Details
joi: object().rename() with a template target can set the validated object's prototype
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.39%). Schedule for your next planned update.
Does your project use an affected joi version?
Paste your package-lock.json to check it for CVE-2026-84367 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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 }.
Patches
Versions 17.13.5 and 18.2.4 have been released to address the issue.
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.
Advisory Timeline
- First published September 8, 2026 (79 days ago).
- Last revised September 8, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install joi@17.13.5
npm install joi@18.2.4
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: npm (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-1321Prototype PollutionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 3.7 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
References
- https://github.com/hapijs/joi/security/advisories/GHSA-gg4h-3hg2-grpcWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-84367ADVISORY
- https://github.com/hapijs/joi/pull/3134WEB
- https://github.com/hapijs/joi/pull/3135WEB
- https://github.com/hapijs/joi/commit/162f367aa178d2e1ebec8dc1164e5fe16536ddf6WEB
- https://github.com/hapijs/joi/commit/172ececa192feda532b743d77bc9d3e523d19b01WEB
- https://github.com/hapijs/joiPACKAGE
- https://github.com/hapijs/joi/releases/tag/v17.13.5WEB
- https://github.com/hapijs/joi/releases/tag/v18.2.4WEB
Frequently Asked Questions
- What is CVE-2026-84367?
- joi: object().rename() with a template target can set the validated object's prototype. This vulnerability has been assigned a severity rating of LOW (CVSS score: 3.7/10).
- How do I check if my project is affected by CVE-2026-84367?
- CVE-2026-84367 affects joi. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-84367 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation is difficult, or the impact is minor.
This is a below-median EPSS score — only 24.7% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-118772HIGH
joi: quadratic-time split in `string().email({ multiple: true })` allows denial of service
- CVE-2026-92599HIGH
joi: Quadratic regular-expression backtracking in `Joi.string().isoDate()`
- CVE-2026-48038MEDIUM
joi has an uncaught RangeError on deeply nested input through recursive `link()` schemas
- CVE-2026-90771MEDIUM
joi messages compilation allows prototype replacement through __proto__ error codes
- CVE-2026-94486LOW
Next.js has information disclosure in development server's Model Context Protocol endpoint
- CVE-2026-84368LOW
joi: Prototype pollution via a `__proto__` language key in custom messages
- CVE-2026-77063LOW
multer vulnerable to file size limit bypass via async fileFilter race condition