{"id":"CVE-2026-84368","aliases":["CLSA-2026-1791362244","CLSA-2026-1792510126","CLSA-2026-1794316825","EUVD-2026-69649","GHSA-6w3j-5fw6-r9vr","ROOT-APP-NPM-CVE-2026-84368"],"status":"published","title":"joi: Prototype pollution via a `__proto__` language key in custom messages","description":"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.","severity":{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00389,"percentile":0.33337,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1321"],"published":"2026-09-01T20:36:51Z","modified":"2026-11-10T19:46:06Z","fixes":[{"ecosystem":"npm","package":"joi","fixed_in":["17.13.6","18.2.5"],"sources":["ghsa"]},{"ecosystem":"TuxCare:npm","package":"@hapi/joi","fixed_in":["16.1.8-tuxcare.1","17.1.1-tuxcare.2"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"joi","fixed_in":["17.13.6-aikido.1","17.13.6-aikido.2"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/joi","fixed_in":["17.13.6-root.io.1","17.13.6-root.io.2"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"joi","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"17.2.0"},{"fixed":"17.13.6"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@hapi/joi","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"16.0.0"},{"last_affected":"17.1.1"}]}]},{"source":"ghsa","ecosystem":"npm","package":"joi","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"18.0.0"},{"fixed":"18.2.5"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@hapi/joi","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"16.1.8-tuxcare.0"},{"fixed":"16.1.8-tuxcare.1"}]}],"versions":["16.1.8"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"joi","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"17.13.4-tuxcare.0"},{"fixed":"17.13.4-tuxcare.1"}]}],"versions":["17.13.4"],"bundled":4},{"source":"osv","ecosystem":"TuxCare:npm","package":"@hapi/joi","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"17.1.1-tuxcare.0"},{"fixed":"17.1.1-tuxcare.2"}]}],"versions":["17.1.1","17.1.1-tuxcare.1"]},{"source":"osv","ecosystem":"npm","package":"joi","ranges":[{"type":"SEMVER","events":[{"introduced":"17.2.0"},{"fixed":"17.13.6"}]}],"bundled":2},{"source":"osv","ecosystem":"npm","package":"@hapi/joi","ranges":[{"type":"SEMVER","events":[{"introduced":"16.0.0"},{"last_affected":"17.1.1"}]}],"bundled":2},{"source":"osv","ecosystem":"npm","package":"joi","ranges":[{"type":"SEMVER","events":[{"introduced":"18.0.0"},{"fixed":"18.2.5"}]}],"bundled":2},{"source":"osv","ecosystem":"Root:npm","package":"joi","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"17.13.6-aikido.1"},{"fixed":"17.13.6-aikido.2"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/joi","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"17.13.6-root.io.1"},{"fixed":"17.13.6-root.io.2"}]}]}],"products":[{"vendor":"hapijs","product":"joi"}],"references":[{"url":"https://github.com/hapijs/joi/security/advisories/GHSA-6w3j-5fw6-r9vr","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/hapijs/joi/pull/3138","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/hapijs/joi/pull/3139","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/hapijs/joi/commit/8d0b808f3e874d28f9078f61b7742290989afb36","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/hapijs/joi/commit/90d07571923c90e3432a328fc041d1cda03d30fa","tags":["x_refsource_MISC","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-84368","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-6w3j-5fw6-r9vr"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/122xxx/CVE-2026-122131.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-122131","tags":["advisory"]},{"url":"https://www.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","tags":["advisory"]},{"url":"https://github.com/hapijs/joi/commit/76f5771e1afe527cfda24be0e1a920ffa54888d6","tags":["fix"]},{"url":"https://github.com/hapijs/joi/commit/dae9467cec27e787bfdea8b276595177d52d28ec","tags":["fix"]},{"url":"https://github.com/hapijs/joi/pull/3164","tags":["fix"]},{"url":"https://github.com/hapijs/joi","tags":["package"]},{"url":"https://github.com/hapijs/joi/blob/v18.3.0/lib/messages.js#L64-L67","tags":["article"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/84xxx/CVE-2026-84368.json","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-84368","title":"joi: Prototype pollution via a `__proto__` language key in custom messages","description":"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.","status":"published","published":"2026-09-01T20:36:51.859Z","modified":"2026-09-02T12:18:07.627Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low","assessor":"cna"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:20:08.391556Z"}],"euvd":[{"id":"EUVD-2026-69649","description":"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.","status":"published","published":"2026-09-01T20:36:51Z","modified":"2026-09-02T12:18:07Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low"}],"updated_at":"2026-11-02T18:01:16.020579Z"}],"ghsa":[{"id":"GHSA-6w3j-5fw6-r9vr","title":"joi: Prototype pollution via a `__proto__` language key in custom messages","description":"### Impact\nAn 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.\n\nThis 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.\n\n### Patches\nUpgrade to version 18.2.5 or 17.13.6.\n\n### Workarounds\nDo 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.","status":"published","published":"2026-09-08T20:55:58Z","modified":"2026-09-08T20:56:00Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:41:14.764963Z"}],"nvd":[{"id":"CVE-2026-84368","description":"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.","status":"published","published":"2026-09-01T21:18:47.887Z","modified":"2026-09-09T21:09:13.08Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low","assessor":"secondary"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:12:43.04945Z"}],"osv":[{"id":"CVE-2026-122131","title":"Joi 17.13.6 before 17.13.9 and 18.2.5 before 18.3.1 Prototype Replacement via __proto__ Language Key","description":"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.","status":"published","published":"2026-11-04T20:36:51.069Z","modified":"2026-11-07T02:31:03.249480425Z","cvss":[{"version":"4.0","score":6.3,"vector":"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","level":"medium"}],"cwes":["CWE-1321"],"updated_at":"2026-11-07T03:08:01.726202Z"},{"id":"CVE-2026-84368","title":"joi: Prototype pollution via a `__proto__` language key in custom messages","description":"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.","status":"published","published":"2026-09-01T20:36:51.859Z","modified":"2026-11-05T10:55:49.405863204Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low"}],"cwes":["CWE-1321"],"updated_at":"2026-11-05T13:30:49.23793Z"},{"id":"GHSA-6w3j-5fw6-r9vr","title":"joi: Prototype pollution via a `__proto__` language key in custom messages","description":"### Impact\nAn 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.\n\nThis 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.\n\n### Patches\nUpgrade to version 18.2.5 or 17.13.6.\n\n### Workarounds\nDo 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.","status":"published","published":"2026-09-08T20:55:58Z","modified":"2026-11-05T10:55:49.405863204Z","cvss":[{"version":"3.1","score":3.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"low"}],"cwes":["CWE-1321"],"updated_at":"2026-11-05T13:30:49.23793Z"},{"id":"CLSA-2026-1791362244","title":"TuxCare security update for @hapi/joi (1 CVE)","description":"TuxCare rebuilt @hapi/joi to address 1 CVE. Fixed in 16.1.8-tuxcare.1.","status":"published","published":"2026-10-07T08:37:24Z","modified":"2026-10-15T09:47:39.674737264Z","updated_at":"2026-11-02T15:43:49.016976Z"},{"id":"CLSA-2026-1792510126","title":"TuxCare security update for joi (4 CVEs)","description":"TuxCare rebuilt joi to address 4 CVEs. Fixed in 17.13.4-tuxcare.1.","status":"published","published":"2026-10-20T15:28:46Z","modified":"2026-10-20T19:30:18.883518642Z","updated_at":"2026-11-02T15:43:54.378946Z"},{"id":"CLSA-2026-1794316825","title":"TuxCare security update for @hapi/joi (1 CVE)","description":"TuxCare rebuilt @hapi/joi to address 1 CVE. Fixed in 17.1.1-tuxcare.2.","status":"published","published":"2026-11-10T14:20:26Z","modified":"2026-11-10T19:46:06.655576786Z","updated_at":"2026-11-10T20:12:16.608797Z"},{"id":"ROOT-APP-NPM-CVE-2026-84368","title":"CVE-2026-84368 in joi - Patched by Root","description":"Root has patched CVE-2026-84368 in the joi package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-10-13T06:42:23Z","modified":"2026-10-13T07:15:04.958524027Z","updated_at":"2026-11-02T15:53:27.649662Z"}]}}
