Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend crafted x-__proto__ key in request
-
DeliveryRegex capture group interpolates to __proto__
-
Exploitjoi assigns attacker value to prototype slot
-
ExecutionValidated object inherits attacker-supplied properties
-
PersistHandler reads prototype-inherited property
-
ImpactAuthorization logic observes injected value
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V3 - Web Frontend Security Prototype pollution prevention
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires ALL of the following conditions simultaneously in the joi schema: (1) object().rename() must use a regular-expression source pattern - not a static string; (2) the rename target must be a Joi.x() or Joi.expression() expression that interpolates regex capture groups, causing the rendered target to be derived from attacker-controlled input; and (3) the { multiple: true } option must be explicitly set, since the default is { multiple: false } which is not affected. Static string rename targets are never affected regardless of other options. The blast radius is further bounded: global Object.prototype is not modified - only the prototype of the specific object returned by that validate() call is affected. For any security-relevant outcome, downstream application code must also read a prototype-inherited property from the validated result rather than only its own enumerable properties. |
| Impact | The provided CVSS 3.7 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N) is well-calibrated and consistent with independent assessment. AC:H is justified: exploitation requires a schema that simultaneously uses a regex rename source, a Joi.x() or Joi.expression() interpolating template, and { multiple: true } - none of which is the default configuration. I:L is accurate because impact is confined to the prototype of the single validated object; requests to other routes and global prototype chains are unaffected. No EPSS score was provided in the input data, and no CISA KEV listing exists, consistent with the low base score. Real-world risk is low for most deployments. However, applications that use this exact non-default schema pattern and then evaluate prototype-inherited properties on the validated result - for example, authorization checks - could be exposed to within-request privilege escalation. Defenders should audit schemas rather than treat the low CVSS as universally dismissible. |
| Exploit ScenarioDerived | An attacker submits a JSON body such as {"user":"alice","x-__proto__":{"isAdmin":true,"role":"superuser"}} to an API endpoint whose joi schema includes .rename(/^x-(.+)$/, Joi.x('{#1}'), { multiple: true }). The rename resolves the capture group to __proto__, setting the prototype of the returned value object to the attacker-supplied object. If the route handler subsequently checks value.isAdmin, the prototype-inherited property evaluates to true, potentially granting unauthorized access within that request. No public proof-of-concept beyond the in-repository test case introduced by the fix exists at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 01, 2026
Limited prototype pollution in joi's object().rename() allows unauthenticated remote attackers to set the prototype of the object returned by validate(), but does not affect global Object.prototype. When a schema combines a regex rename source, a Joi.x() or Joi.expression() interpolating template target, and { multiple: true }, an input key such as x-__proto__ causes the rename target to resolve to __proto__, which JavaScript interprets as a prototype assignment rather than own-property creation. The scope is strictly confined to the single validation call result - downstream code that reads prototype-inherited properties on that object could observe attacker-injected values, enabling potential within-request privilege escalation. No public exploit or CISA KEV listing exists at time of analysis; CVSS 3.7 (AC:H) accurately reflects the tight, non-default schema configuration required.
RemediationAI
Upgrade joi to version 17.13.5 (v17 branch) or 18.2.4 (v18 branch), which add an explicit __proto__ guard in internals.rename() that raises an object.rename.proto validation error and halts processing rather than performing the prototype assignment. Fixes are confirmed in PRs https://github.com/hapijs/joi/pull/3134 and https://github.com/hapijs/joi/pull/3135 and commits 162f367aa178d2e1ebec8dc1164e5fe16536ddf6 and 172ececa192feda532b743d77bc9d3e523d19b01. If immediate patching is not possible, audit all schemas that call object().rename() and either remove the { multiple: true } option or replace the Joi.x() / Joi.expression() template target with a static string target - either change alone prevents exploitation. There is no network-layer control that mitigates this, since the vulnerability is in application-level validation logic.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
joi (cpe:2.3:a:hapijs:joi:*:*:*:*:*:*:*:*) is the dominant schema validation library in the Node.js/Hapi.js ecosystem. The flaw (CWE-1321: Improper Controlled Modification of Object Prototype Attributes - Prototype Pollution) resides in lib/types/keys.js within internals.rename(). When { multiple: true } is enabled alongside a regex source pattern, the rename loop evaluates each matching key and renders the Joi.x() template using capture-group data derived from the attacker-supplied key name. The rendered string is then used directly as an assignment key without filtering for reserved JavaScript identifiers. JavaScript's bracket assignment obj['__proto__'] = val invokes [[SetPrototypeOf]] semantics on the receiving object rather than creating an own property, so the returned object's prototype is silently replaced. Because this operates only on the intermediate validation result object and not on a shared object literal or Object.prototype itself, global state is unaffected.
Know when Joi gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
AC:H reflects the non-default schema prerequisite (regex rename + Joi.x() template + multiple:true); I:L because only the single validated-object prototype is affected, not global state.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
joi is a schema description language and data validator for JavaScript. From 16.0.0 until 17.13.5 and 18.2.4, joi's lib/types/keys.js internals.rename() implementation used by object().rename() permits a schema that renames keys with a regular-expression source and a Joi.expression() or Joi.x() target that interpolates the pattern's own match data, combined with { multiple: true }, to derive a target from an attacker-controlled input key. An attacker can send x-__proto__ with an object value, causing the target to render as __proto__ and set the prototype of the object returned by validate() instead of creating an own key. The global Object.prototype is not modified, so the effect is confined to the object returned by that validation call. Static-string targets and schemas using the default { multiple: false } are not affected. This issue is fixed in versions 17.13.5 and 18.2.4.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Joi, the JavaScript schema validation library published on npm as joi (17.1.1 through 17.13.8, and 18.0.0 through 18.3.0
Prototype pollution in hapijs/joi's messages compilation function allows network-reachable attackers to replace an objec
Prototype pollution in joi, one of the most widely used JavaScript schema-validation libraries (versions 16.0.0 through
EUVD-2026-69648
GHSA-gg4h-3hg2-grpc
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB