CVE-2026-84367
joi: object().rename() with a template target can set the validated object's prototype
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
3.7
joi: object().rename() with a template target can set the validated object's prototype
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.
- Record
CVE-2026-84367- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-1321
- Updated
- 2026-11-02
EUVDEUVD-2026-69648
3.7
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.
- Record
EUVD-2026-69648- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-gg4h-3hg2-grpc
3.7
joi: object().rename() with a template target can set the validated object's prototype
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.
- Record
GHSA-gg4h-3hg2-grpc- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-1321
- Updated
- 2026-11-02
NVD
3.7
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.
- Record
CVE-2026-84367- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-1321
- Updated
- 2026-11-02
OSV
3.7
joi: object().rename() with a template target can set the validated object's prototype
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.
- Record
CVE-2026-84367- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-1321
- Updated
- 2026-11-02
OSVGHSA-gg4h-3hg2-grpc
3.7
joi: object().rename() with a template target can set the validated object's prototype
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.
- Record
GHSA-gg4h-3hg2-grpc- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-1321
- Updated
- 2026-11-02
OSVCLSA-2026-1792486432 No score
TuxCare security update for @hapi/joi (3 CVEs)
TuxCare rebuilt @hapi/joi to address 3 CVEs. Fixed in 16.1.8-tuxcare.2.
- Record
CLSA-2026-1792486432- Updated
- 2026-11-02
OSVCLSA-2026-1792510126 No score
TuxCare security update for joi (4 CVEs)
TuxCare rebuilt joi to address 4 CVEs. Fixed in 17.13.4-tuxcare.1.
- Record
CLSA-2026-1792510126- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2026-84367 No score
CVE-2026-84367 in joi - Patched by Root
Root has patched CVE-2026-84367 in the joi package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2026-84367- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
joinpm |
16.0.0 up to 17.13.5 | 17.13.5 |
joinpm |
18.0.0 up to 18.2.4 | 18.2.4 |
@hapi/joiTuxCare:npm From an advisory covering 3 CVEs |
16.1.8-tuxcare.0 up to 16.1.8-tuxcare.2, plus listed versions 16.1.816.1.8-tuxcare.1 |
16.1.8-tuxcare.2 |
joiTuxCare:npm From an advisory covering 4 CVEs |
17.13.4-tuxcare.0 up to 17.13.4-tuxcare.1, plus listed versions 17.13.4 |
17.13.4-tuxcare.1 |
joiRoot:npm |
before 17.13.5-aikido.1 | 17.13.5-aikido.117.13.5-aikido.2 |
@rootio/joiRoot:npm |
before 17.13.5-root.io.1 | 17.13.5-root.io.117.13.5-root.io.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-84367 is a low vulnerability (CVSS 3.7) in Hapijs Joi, published September 1, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.39%, the 33rd percentile. Fixed in joi 17.13.5.
References
github.com/hapijs/joi/security/advisories/GHSA-gg4h-3hg2-grpc
github.com/hapijs/joi/pull/3134
github.com/hapijs/joi/pull/3135
github.com/hapijs/joi/commit/162f367aa178d2e1ebec8dc1164e5fe16536ddf6
github.com/hapijs/joi/commit/172ececa192feda532b743d77bc9d3e523d19b01
nvd.nist.gov/vuln/detail/CVE-2026-84367