Skip to main content

CVE-2026-84368 — Vulnerability in joi — CVE Details

LOW

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

Published September 8, 2026Updated November 5, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.39%). Schedule for your next planned update.

Does your project use an affected joi version?

Paste your package-lock.json to check it for CVE-2026-84368 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary

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 or 17.13.6.

Workarounds

Do not pass untrusted input into messages(), message(), prefs({ messages }), Joi.extend({ messages }) or rule({ message }). Or validate that they don't contain any __proto__ or constructor property.

Advisory Timeline

  • First published September 8, 2026 (79 days ago).
  • Last revised November 5, 2026 — 58 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update joi to 17.13.6 or later
npm install joi@17.13.6
npm
Update joi to 18.2.5 or later
npm install joi@18.2.5

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 1 ecosystem: npm (2).

PackageFixed In
joi npm · Affected: All versions17.13.6
@hapi/joi npm · Affected: All versionsRange-based data available
joi npm · Affected: All versions18.2.5

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-1321
    Prototype PollutionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 3.7 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N

Frequently Asked Questions

What is CVE-2026-84368?
joi: Prototype pollution via a `__proto__` language key in custom messages. This vulnerability has been assigned a severity rating of LOW (CVSS score: 3.7/10).
How do I check if my project is affected by CVE-2026-84368?
CVE-2026-84368 affects joi and @hapi/joi. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-84368 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
3.7

Exploitation is difficult, or the impact is minor.

EPSS Score (30-day exploit probability)
0.39%
EPSS percentile: 24.7

This is a below-median EPSS score — only 24.7% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

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

Related CVEs

  • CVE-2026-44974
    HIGH

    @hapi/content header parser has a parameter smuggling issue that allows upload-filter bypass via duplicate parameters

  • CVE-2026-118772
    HIGH

    joi: quadratic-time split in `string().email({ multiple: true })` allows denial of service

  • CVE-2026-92599
    HIGH

    joi: Quadratic regular-expression backtracking in `Joi.string().isoDate()`

  • CVE-2026-48038
    MEDIUM

    joi has an uncaught RangeError on deeply nested input through recursive `link()` schemas

  • CVE-2026-90771
    MEDIUM

    joi messages compilation allows prototype replacement through __proto__ error codes

  • CVE-2026-94486
    LOW

    Next.js has information disclosure in development server's Model Context Protocol endpoint

  • CVE-2026-84367
    LOW

    joi: object().rename() with a template target can set the validated object's prototype

  • CVE-2026-77063
    LOW

    multer vulnerable to file size limit bypass via async fileFilter race condition

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json