CVE-2026-90771: Joi Joi Messages Compilation Allows Prototype Vulnerability
MODERATECVE-2026-90771 is a MODERATE (CVSS 3.7) joi messages compilation allows prototype vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Joi libraries in the npm ecosystem. The issue involves joi messages compilation allows prototype replacement through __proto__ error codes. Remediation is available by upgrading affected packages to version 17.13.8, 18.2.9.
CVE-2026-90771 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2026-90771
To remediate this vulnerability, upgrade all affected Joi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install joi@17.13.8
npm install joi@18.2.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls joi
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-90771, inspect your project dependencies using npm:
npm ls joi
Analyze the terminal output to locate any version of Joi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 17.13.8), your application is affected.
Note: The npm ls joi command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Joi, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-90771 Affected Joi Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2026-90771?
Which Joi versions are affected?
What version fixes CVE-2026-90771?
Is joi affected?
What is the CVSS score of CVE-2026-90771?
What CWE is associated with CVE-2026-90771?
How can I check npm dependencies for CVE-2026-90771?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wr44-6hxh-3jwq",
"modified" : "2026-10-05T23:29:52Z",
"published" : "2026-09-13T12:31:12Z",
"aliases" : [ "CVE-2026-90771" ],
"summary" : "joi messages compilation allows prototype replacement through __proto__ error codes",
"details" : "joi before versions 17.13.8 and 18.2.9 contains a prototype pollution vulnerability in the messages compilation function that accepts __proto__ as an error code. Attackers can supply __proto__ keys in custom messages to replace the returned object's prototype, breaking downstream code relying on Object.prototype methods.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "joi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "17.13.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "joi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "18.0.0"
}, {
"fixed" : "18.2.9"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-90771"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/joi/issues/3150"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/joi/pull/3151"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/joi/pull/3153"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/joi/commit/1d2001cad9971327a62c9fd8eb1afec20cd784d2"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/joi/commit/5b8333c9177e08b4ef4ed02903c2d657084e7afb"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/hapijs/joi"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/joi/blob/v18.2.8/lib/messages.js"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/joi/releases/tag/v17.13.8"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/joi/releases/tag/v18.2.9"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/joi-before-17.13.8-and-18.2.9-prototype-pollution-via-messages"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-05T23:29:52Z",
"nvd_published_at" : "2026-09-13T11:17:01Z"
}
}