Description
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.
Published: 2026-09-01
Score: 3.7 Low
EPSS: < 1% Very Low
KEV: No
Impact: Prototype Pollution
Action: Patch
AI Analysis

Impact

The vulnerability exists in the Joi validation library when the object().rename() method is used with a regular‑expression source and a template target that interpolates match data. When { multiple: true } is specified, an attacker can send a key such as x-__proto__ with an object value, causing the target name to evaluate to __proto__ and thereby set the prototype of the object returned by validate() instead of creating a normal key property. This alteration is limited to the object returned by the validation call and does not modify the global Object.prototype. If the prototype is polluted, subsequent code that relies on prototype properties can be subverted, potentially leading to logic flaws or code execution through prototype cascades.

Affected Systems

Vulnerable versions of hapijs Joi include all releases from 16.0.0 up through 17.13.4 and 18.2.3. The issue has been fixed in Joi releases 17.13.5 and 18.2.4. Any project that imports Joi 16.x, 17.x prior to 17.13.5, or 18.x prior to 18.2.4 is affected.

Risk and Exploitability

The CVSS score of 3.7 classifies this issue as low severity. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog, indicating no known widespread exploitation. However, the potential for prototype pollution means an attacker could influence the behavior of privileged code that consumes the validated object, especially if the validator is used on untrusted input in a server‑side context. The exploitation vector is likely remote, via any HTTP request or other data source that the application validates with Joi's rename feature.

Generated by OpenCVE AI on September 2, 2026 at 03:32 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Joi to version 17.13.5 or later, or to 18.2.4 or later.
  • If an immediate upgrade is not possible, remove or avoid using object().rename() with { multiple: true } and a template target; instead, use static string keys or disallow regex sources in the rename operation.
  • Sanitize or reject any key names that could influence prototype properties, such as keys containing "__proto__" or "constructor".

Generated by OpenCVE AI on September 2, 2026 at 03:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-gg4h-3hg2-grpc joi: object().rename() with a template target can set the validated object's prototype
History

Fri, 04 Sep 2026 09:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 02 Sep 2026 02:15:00 +0000

Type Values Removed Values Added
First Time appeared Hapijs
Hapijs joi
Vendors & Products Hapijs
Hapijs joi

Tue, 01 Sep 2026 22:00:00 +0000

Type Values Removed Values Added
Description 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.
Title joi: object().rename() with a template target can set the validated object's prototype
Weaknesses CWE-1321
References
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-03T15:58:42.656Z

Reserved: 2026-09-01T16:27:58.129Z

Link: CVE-2026-84367

cve-icon Vulnrichment

Updated: 2026-09-03T15:58:39.544Z

cve-icon NVD

Status : Deferred

Published: 2026-09-01T21:18:47.737

Modified: 2026-09-09T21:09:13.080

Link: CVE-2026-84367

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-02T03:45:04Z

Weaknesses
  • CWE-1321

    Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')