Skip to content

← Actionable
Low, CVSS 3.7amended

joi: Prototype pollution via a __proto__ language key in custom messages

CVE-2026-84368GHSA-6w3j-5fw6-r9vr

What to do

Partial vendor fix. Follow the primary source's mitigation guidance and check back for a fix.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm @hapi/joi

    Affected
    >= 16.0.0, <= 17.1.1
    Fixed in
    no fixed version recorded
  • npm joi

    Affected
    >= 17.2.0, < 17.13.6>= 18.0.0, < 18.2.5
    Fixed in
    17.13.6, 18.2.5

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
3.7 · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS
  • CVE-2026-84368: 0.39% estimated exploitation activity in the next 30 days; percentile 33.07 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Impact An application that passes attacker-controlled data into joi's custom message configuration (messages(), message(), prefs({ messages }), Joi.extend({ messages }) or rule({ message })) lets the attacker write properties onto Object.prototype, where every object in the process then inherits them. A key named proto was treated as a language name, and the code reused the object it found at that key, which resolves to the prototype rather than to a new own property; a key named constructor did the same to the Object function's statics. A consuming application that gates on the mere presence of a property (if (user.isAdmin)) can be made to take the wrong branch for every object it inspects. This is not reachable from data that joi validates. Custom messages are schema-construction configuration, normally written by the application developer. Exploitation therefore requires an application that feeds untrusted input straight into schema construction. Patches Upgrade to version 18.2.5…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from ghsa record GHSA-6w3j-5fw6-r9vr

  2. Revision 2 · amended ·

    Amended from osv record GHSA-6w3j-5fw6-r9vr

  3. Revision 1 · created ·

    Published from ghsa record GHSA-6w3j-5fw6-r9vr

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-84368

Advisory: joi: Prototype pollution via a `__proto__` language key in custom messages
IDs: CVE-2026-84368, GHSA-6w3j-5fw6-r9vr
Record: https://patchnext.com/advisories/cve-2026-84368 (revision 3, source checked 26 Oct 2026, 13:02 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Low (CVSS 3.7)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Partial vendor fix; fixed versions by package: joi 18.2.5, 17.13.6. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm @hapi/joi: affected >= 16.0.0, <= 17.1.1
- npm joi: affected >= 17.2.0, < 17.13.6; >= 18.0.0, < 18.2.5; fixed in 17.13.6, 18.2.5

## Suggested inspection (read-only)
- `npm ls @hapi/joi --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls joi --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on @hapi/joi, joi.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-6w3j-5fw6-r9vr (GitHub-reviewed advisory GHSA-6w3j-5fw6-r9vr lists affected ranges: npm joi >=17.2.0 =18.0.0 =16.0.0 <=17.1.1)
- Verified: https://osv.dev/vulnerability/GHSA-6w3j-5fw6-r9vr (OSV record GHSA-6w3j-5fw6-r9vr lists affected ranges: npm joi >=17.2.0 =18.0.0 =16.0.0 <=17.1.1)

Commands are suggestions: review each one before running it.

Loading voting…