CVE-2026-122131
Received Received - Intake

Joi Message Prototype Pollution in compile() and merge()

Vulnerability report for CVE-2026-122131, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-04

Last updated on: 2026-11-04

Assigner: VulnCheck

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-04
Last Modified
2026-11-04
Generated
2026-11-05
AI Q&A
2026-11-05
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
hapijs joi 17.13.6
hapijs joi 18.2.5

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1321 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.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a prototype pollution vulnerability in the Joi library versions 17.13.6 before 17.13.9 and 18.2.5 before 18.3.1. It occurs in lib/messages.js where the compile() and merge() functions fail to reject a __proto__ language key. Attackers can supply untrusted message configuration via methods like any().messages(), prefs, validate options, or Joi.extend to replace the compiled messages prototype. This may alter or break validation error rendering and dependent logic.

Detection Guidance

To detect this vulnerability, check the installed version of Joi in your project using npm list joi or grep for joi in package.json. Versions 17.13.6 to 17.13.8 and 18.2.5 to 18.3.0 are vulnerable. Review code that uses any().messages(), prefs, validate options, or Joi.extend for untrusted input handling.

Impact Analysis

If exploited, this vulnerability could allow attackers to manipulate the prototype chain of the application. This might cause logic errors if the application checks for property existence, such as bypassing security checks or altering application behavior. It could also break validation error rendering, leading to incorrect or misleading error messages.

Mitigation Strategies

Immediately update Joi to version 17.13.9 or 18.3.1 or later. If updating is not possible, avoid passing untrusted input to message configuration functions like any().messages(), prefs, validate options, or Joi.extend. Validate input to exclude __proto__ or constructor properties.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-122131. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...