CVE-2026-84368
joi: @hapi/joi: joi: Prototype pollution via untrusted input in schema configuration
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · September 2, 2026
Updated · September 3, 2026
Description
A flaw was found in joi. This vulnerability, known as prototype pollution, allows an attacker to inject properties into core JavaScript objects by supplying untrusted input directly into schema-construction configuration. Specifically, by using language keys like __proto__ or constructor in custom messages, an attacker can write properties onto Object.prototype or the Object function's static properties. This can lead to a consuming application taking incorrect execution paths, potentially altering its behavior in unexpected ways.
Statement
A flaw was found in joi, a data validation library for JavaScript. Prototype pollution exists in the message compilation and merging logic, where attacker-controlled language keys such as proto supplied through schema configuration methods can write properties onto Object.prototype. Exploitation requires an application to pass untrusted input directly into schema-construction configuration, not into validated data, making real-world impact limited.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Upgrade to joi 17.13.6 or 18.2.5. As a workaround, ensure that only trusted, developer-controlled input is passed into joi schema configuration methods such as messages(), message(), prefs({ messages }), Joi.extend({ messages }), or rule({ message }). Do not pass user-supplied data directly into schema construction.
CVSS / CWE
CVSS 3.1 · 3.7CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
CWE-915 · Improperly Controlled Modification of Dynamically-Determined Object Attributes