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

Summary

CVECVE-2026-84368
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-09-01 21:18:47 UTC
Updated2026-09-09 21:09:13 UTC
Descriptionjoi 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.

Risk And Classification

Primary CVSS: v3.1 3.7 LOW from [email protected]

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

EPSS: 0.002550000 probability, percentile 0.170980000 (date 2026-09-10)

Problem Types: CWE-1321 | CWE-1321 CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary3.7LOWCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
3.1CNADECLARED3.7LOWCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N

CVSS v3.1 Breakdown

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

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Hapijs Joi affected >= 16.0.0, <= 17.1.1 Not specified
CNA Hapijs Joi affected >= 17.2.0, < 17.13.6 Not specified
CNA Hapijs Joi affected >= 18.0.0, < 18.2.5 Not specified

References

ReferenceSourceLinkTags
github.com/hapijs/joi/security/advisories/GHSA-6w3j-5fw6-r9vr [email protected] github.com
github.com/hapijs/joi/pull/3139 [email protected] github.com
github.com/hapijs/joi/commit/8d0b808f3e874d28f9078f61b7742290989afb36 [email protected] github.com
github.com/hapijs/joi/pull/3138 [email protected] github.com
github.com/hapijs/joi/commit/90d07571923c90e3432a328fc041d1cda03d30fa [email protected] github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report