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


- **Severity:** Low 3.7 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 1 Sep 2026
- **Updated:** 3 Sep 2026
- **Also known as:** ECHO-b209-69fa-da03, GHSA-gg4h-3hg2-grpc, MINI-22wm-q4g5-j4pm, MINI-3hfp-4hhv-qqph, MINI-55hx-429w-7f6c, MINI-6p98-336j-pp7h, MINI-77pm-j5wx-mcr8, MINI-8m4w-prx6-w4rw, MINI-8wjw-rxfc-cjfv, MINI-f965-6jg8-f87v, MINI-fp7f-jqx3-xp8j, MINI-fx3q-5vrg-4rr6, MINI-gc2x-c8cg-r4hw, MINI-h3g3-q283-f9cg, MINI-h7g7-7wfr-2293, MINI-j763-c43j-2cj6, MINI-m5p6-c3hm-8899, MINI-mcf9-7hvj-66fg, MINI-p6g2-php4-3r22, MINI-rcr8-fg4p-jxm2, ROOT-APP-NPM-CVE-2026-84367

## What is CVE-2026-84367?

CVE-2026-84367 is a low-severity vulnerability in hapijs joi, published on 1 Sep 2026. 

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

Weakness: CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes)

## Which versions are affected by CVE-2026-84367?

4 open source packages ship an affected version, including joi.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `joi` | npm | From 16.0.0 | 17.13.5 |
| `joi` | npm | From 16.0.0 | 17.13.5 |
| `joi` | npm | From 18.0.0 | 18.2.4 |
| `joi` | npm | From 18.0.0 | 18.2.4 |

## How do I fix CVE-2026-84367?

Upgrade joi to a fixed version for your release line: 17.13.5 or 18.2.4.

## Is CVE-2026-84367 being exploited?

There is no known exploitation of CVE-2026-84367 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-84367 and fix it if it is affected.

What it is: CVE-2026-84367 is a low-severity vulnerability in hapijs joi, published on 1 Sep 2026. 
Exploitation: There is no known exploitation of CVE-2026-84367 in the wild and no public exploit code.

Affected packages and fixed versions:
- joi (npm): affected from 16.0.0; fixed in 17.13.5
- joi (npm): affected from 16.0.0; fixed in 17.13.5
- joi (npm): affected from 18.0.0; fixed in 18.2.4
- joi (npm): affected from 18.0.0; fixed in 18.2.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-84367/ (Markdown: https://insights.sbomify.com/CVE-2026-84367/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-84367
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-84367
- OSV: https://osv.dev/vulnerability/CVE-2026-84367

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-84367/
Summaries are generated and may contain mistakes; the official description above is the record.
