CVE-2026-122131

Joi 17.13.6 before 17.13.9 and 18.2.5 before 18.3.1 Prototype Replacement via __proto__ Language Key

Published Nov 4, 2026 CVSS 4.0 · 6.3 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A prototype pollution flaw exists in Joi versions 17.13.6 through 17.13.8 and 18.2.5 through 18.2.x, caused by the library's failure to reject a __proto__ language key during message compilation. The flaw enables attackers to override the internal prototype used for error messages, potentially changing or breaking how validation errors are rendered and influencing logic that depends on those messages. This is a classic prototype injection weakness (CWE-1321) and can lead to altered application behavior or denial of service. The vulnerability also maps to CWE-915, indicating unsafe or uncontrolled modification of internal state.

Affected Systems

The affected product is the Joi validation library from hapijs. Vulnerable versions include 17.13.6 up to 17.13.8 and 18.2.5 up through any 18.2.x less than 18.3.1. Any application that imports these versions is at risk when untrusted message configurations are passed via any().messages(), prefs, validate options, or Joi.extend.

Risk and Exploitability

With a CVSS score of 6.3, the vulnerability is of moderate severity. EPSS is < 1%, and the issue is not listed in the CISA KEV catalog. An attacker who can supply configuration data to Joi – such as a user submitting form input that is forwarded to a Joi validation routine – can trigger the prototype replacement, then use the altered prototype to influence validation output or trigger other downstream logic. The attack requires code execution within the application context, so indirect exploitation may combine this flaw with other vulnerabilities for higher impact.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Joi to version 17.13.9 or later, or 18.3.1 or later, as the fix removes the prototype injection flaw.
  • Sanitize any message configuration before passing it to Joi by stripping or rejecting __proto__ keys, ensuring that only trusted keys are used.
  • Implement validation of user‑supplied message configurations to reject language keys that can alter prototypes.

Generated by OpenCVE AI on November 6, 2026 at 13:59 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Hapijs
Hapijs joi
Vendors & Products Hapijs
Hapijs joi
Type Values Removed Values Added
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.
Title Joi 17.13.6 before 17.13.9 and 18.2.5 before 18.3.1 Prototype Replacement via __proto__ Language Key
Weaknesses CWE-1321
References
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N'}

cvssV4_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'}

Weaknesses
  • CWE-1321

    Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

  • CWE-915

    Improperly Controlled Modification of Dynamically-Determined Object Attributes

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 5, 2026, 7:40 PM
Reserved
Nov 4, 2026, 6:13 PM
Status
Awaiting Analysis
Published
Nov 4, 2026, 9:18 PM
Modified
Nov 12, 2026, 9:30 PM
Severity
Low
Public date
Nov 4, 2026, 8:36 PM