CVE Catalog

CVE-2026-84367

LowCVSS 3.7
Published: Translated: NVD NIST

Summary

In the joi library, there is a vulnerability in the internals.rename() implementation used by object().rename(). It allows creating a schema that, using a regular expression and a Joi.expression() or Joi.x() target with match data interpolation, can set the prototype of the object returned by validate() to __proto__ instead of creating an own key.

Risk Assessment

An attacker can influence the prototype of the object returned by validation, potentially leading to unexpected application behavior, but the global Object.prototype is not modified.

Recommendation

Update the joi library to version 17.13.5 or 18.2.4, which contain the fix.

Other vulnerabilities in joi

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS