CVE-2026-90771: Joi Joi Messages Compilation Allows Prototype Vulnerability

MODERATE
Advisory Identifier: GHSA-wr44-6hxh-3jwq
CVSS 3.7
CWE-1321
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-90771
GHSA Identifier GHSA-wr44-6hxh-3jwq
Severity MODERATE
CVSS v3.1 Base Score 3.7
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Joi
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (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.

joi fixed: 17.13.8
npm install joi@17.13.8
joi fixed: 18.2.9
npm install joi@18.2.9
Verify Direct and Transitive Dependencies

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

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.

CVE-2026-90771 Affected Joi Versions

2 component(s)
Fixed Versions:
17.13.818.2.9
Product / Package Ecosystem Affected Versions Fixed Version
joi
npm
< 17.13.8
17.13.8
joi
npm
≥ 18.0.0
< 18.2.9
18.2.9

References

Frequently Asked Questions

What is CVE-2026-90771?
CVE-2026-90771 is a security vulnerability in Joi involving joi messages compilation allows prototype replacement through __proto__ error codes under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Joi versions are affected?
Affected versions include releases prior to 17.13.8, 18.2.9 across affected packages: joi.
What version fixes CVE-2026-90771?
Upgrading to 17.13.8, 18.2.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is joi affected?
Yes, joi is affected in releases prior to 17.13.8, 18.2.9. Upgrade your dependency to 17.13.8, 18.2.9 or later.
What is the CVSS score of CVE-2026-90771?
CVE-2026-90771 has a CVSS v3.1 base score of 3.7 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-90771?
CVE-2026-90771 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (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.).
How can I check npm dependencies for CVE-2026-90771?
Run the dependency tree command: 'npm ls joi'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}