CVE-2026-84368
joi: Prototype pollution via a `__proto__` language key in custom messages
joi is a schema description language and data validator for JavaScript. From 16.0.0 until 17.13.6 and 18.2.5, the @hapi/joi package through 17.1.1 and the successor joi package contain prototype pollution in lib/messages.js, where exports.compile() and exports.merge() reuse inherited objects for attacker-controlled language keys supplied through messages(), message(), prefs({ messages }), Joi.extend({ messages }), or rule({ message }). A language key named proto writes properties onto Object.prototype, and constructor writes to the Object function's static properties. A consuming application that gates on the presence of an inherited property can take the wrong branch for every inspected object. The flaw is not reachable from data that joi validates and requires an application to feed untrusted input directly into schema-construction configuration. This issue is fixed in joi versions 17.13.6 and 18.2.5; no fixed @hapi/joi version is available.
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: Prototype pollution via a `__proto__` language key in custom messages
joi is a schema description language and data validator for JavaScript. From 16.0.0 until 17.13.6 and 18.2.5, the @hapi/joi package through 17.1.1 and the successor joi package contain prototype pollution in lib/messages.js, where exports.compile() and exports.merge() reuse inherited objects for attacker-controlled language keys supplied through messages(), message(), prefs({ messages }), Joi.extend({ messages }), or rule({ message }). A language key named proto writes properties onto Object.prototype, and constructor writes to the Object function's static properties. A consuming application that gates on the presence of an inherited property can take the wrong branch for every inspected object. The flaw is not reachable from data that joi validates and requires an application to feed untrusted input directly into schema-construction configuration. This issue is fixed in joi versions 17.13.6 and 18.2.5; no fixed @hapi/joi version is available.
- Record
CVE-2026-84368- 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-69649
3.7
joi is a schema description language and data validator for JavaScript. From 16.0.0 until 17.13.6 and 18.2.5, the @hapi/joi package through 17.1.1 and the successor joi package contain prototype pollution in lib/messages.js, where exports.compile() and exports.merge() reuse inherited objects for attacker-controlled language keys supplied through messages(), message(), prefs({ messages }), Joi.extend({ messages }), or rule({ message }). A language key named proto writes properties onto Object.prototype, and constructor writes to the Object function's static properties. A consuming application that gates on the presence of an inherited property can take the wrong branch for every inspected object. The flaw is not reachable from data that joi validates and requires an application to feed untrusted input directly into schema-construction configuration. This issue is fixed in joi versions 17.13.6 and 18.2.5; no fixed @hapi/joi version is available.
- Record
EUVD-2026-69649- 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-6w3j-5fw6-r9vr
3.7
joi: Prototype pollution via a `__proto__` language key in custom messages
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.
- Record
GHSA-6w3j-5fw6-r9vr- 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.6 and 18.2.5, the @hapi/joi package through 17.1.1 and the successor joi package contain prototype pollution in lib/messages.js, where exports.compile() and exports.merge() reuse inherited objects for attacker-controlled language keys supplied through messages(), message(), prefs({ messages }), Joi.extend({ messages }), or rule({ message }). A language key named proto writes properties onto Object.prototype, and constructor writes to the Object function's static properties. A consuming application that gates on the presence of an inherited property can take the wrong branch for every inspected object. The flaw is not reachable from data that joi validates and requires an application to feed untrusted input directly into schema-construction configuration. This issue is fixed in joi versions 17.13.6 and 18.2.5; no fixed @hapi/joi version is available.
- Record
CVE-2026-84368- 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
OSVCVE-2026-122131
6.3
Joi 17.13.6 before 17.13.9 and 18.2.5 before 18.3.1 Prototype Replacement via __proto__ Language Key
Joi 17.13.6 before 17.13.9 and 18.2.5 before 18.3.1 contains a prototype pollution vulnerability in lib/messages.js compile() and merge() that fails to reject a proto language key. Attackers supplying untrusted message configuration via any().messages(), prefs, validate options or Joi.extend can replace the compiled messages prototype, altering or breaking validation error rendering and dependent logic.
- Record
CVE-2026-122131- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-1321
- Updated
- 2026-11-07
OSV
3.7
joi: Prototype pollution via a `__proto__` language key in custom messages
joi is a schema description language and data validator for JavaScript. From 16.0.0 until 17.13.6 and 18.2.5, the @hapi/joi package through 17.1.1 and the successor joi package contain prototype pollution in lib/messages.js, where exports.compile() and exports.merge() reuse inherited objects for attacker-controlled language keys supplied through messages(), message(), prefs({ messages }), Joi.extend({ messages }), or rule({ message }). A language key named proto writes properties onto Object.prototype, and constructor writes to the Object function's static properties. A consuming application that gates on the presence of an inherited property can take the wrong branch for every inspected object. The flaw is not reachable from data that joi validates and requires an application to feed untrusted input directly into schema-construction configuration. This issue is fixed in joi versions 17.13.6 and 18.2.5; no fixed @hapi/joi version is available.
- Record
CVE-2026-84368- 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-05
Show 4 moreShow less
OSVGHSA-6w3j-5fw6-r9vr
3.7
joi: Prototype pollution via a `__proto__` language key in custom messages
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.
- Record
GHSA-6w3j-5fw6-r9vr- 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-05
OSVCLSA-2026-1791362244 No score
TuxCare security update for @hapi/joi (1 CVE)
TuxCare rebuilt @hapi/joi to address 1 CVE. Fixed in 16.1.8-tuxcare.1.
- Record
CLSA-2026-1791362244- 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-84368 No score
CVE-2026-84368 in joi - Patched by Root
Root has patched CVE-2026-84368 in the joi package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2026-84368- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
joinpm |
17.2.0 up to 17.13.6 | 17.13.6 |
@hapi/joinpm |
16.0.0 to 17.1.1 | None known |
joinpm |
18.0.0 up to 18.2.5 | 18.2.5 |
@hapi/joiTuxCare:npm |
16.1.8-tuxcare.0 up to 16.1.8-tuxcare.1, plus listed versions 16.1.8 |
16.1.8-tuxcare.1 |
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 |
joinpm From an advisory covering 2 CVEs |
17.2.0 up to 17.13.6 | 17.13.6 |
@hapi/joinpm From an advisory covering 2 CVEs |
16.0.0 to 17.1.1 | None known |
joinpm From an advisory covering 2 CVEs |
18.0.0 up to 18.2.5 | 18.2.5 |
joiRoot:npm |
before 17.13.6-aikido.1 | 17.13.6-aikido.117.13.6-aikido.2 |
@rootio/joiRoot:npm |
before 17.13.6-root.io.1 | 17.13.6-root.io.117.13.6-root.io.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| references | OSV | |
| facts, references | OSV | |
| 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-84368 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.6.
References
github.com/hapijs/joi/security/advisories/GHSA-6w3j-5fw6-r9vr
github.com/hapijs/joi/pull/3138
github.com/hapijs/joi/pull/3139
github.com/hapijs/joi/commit/8d0b808f3e874d28f9078f61b7742290989afb36
github.com/hapijs/joi/commit/90d07571923c90e3432a328fc041d1cda03d30fa
nvd.nist.gov/vuln/detail/CVE-2026-84368
Show 10 moreShow less
github.com/advisories/GHSA-6w3j-5fw6-r9vr
github.com/CVEProject/cvelistV5/tree/main/cves/2026/122xxx/CVE-2026-122131.json
nvd.nist.gov/vuln/detail/CVE-2026-122131
vulncheck.com/advisories/joi-17.13.6-before-17.13.9-and-18.2.5-before-18.3.1-prototype-replacement-via-proto-language-key
github.com/hapijs/joi/commit/76f5771e1afe527cfda24be0e1a920ffa54888d6
github.com/hapijs/joi/commit/dae9467cec27e787bfdea8b276595177d52d28ec
github.com/hapijs/joi/pull/3164
github.com/hapijs/joi
github.com/hapijs/joi/blob/v18.3.0/lib/messages.js
github.com/CVEProject/cvelistV5/tree/main/cves/2026/84xxx/CVE-2026-84368.json