Skip to main content

Joi CVE-2026-122131

| EUVDEUVD-2026-117085 MEDIUM
Improperly Controlled Modification of Object Prototype Attributes (Prototype Pollution) (CWE-1321)
2026-11-04 VulnCheck GHSA-gw37-7cc7-xmm6
6.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach endpoint feeding untrusted schema config
  2. Delivery
    Supply message object with __proto__ language key
  3. Exploit
    compile()/merge() reuses inherited prototype object
  4. Execution
    Compiled messages prototype replaced
  5. Impact
    Validation rendering and dependent property-gating logic corrupted

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V3 - Web Frontend Security Prototype pollution prevention
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an application to pass attacker-controlled data directly into Joi's custom message configuration - specifically any().messages(), message(), prefs({ messages }), Joi.extend({ messages }), or rule({ message }) - where the untrusted object contains a __proto__ (or constructor) key treated as a language name. This is explicitly NOT reachable from data that Joi validates; custom messages are schema-construction configuration normally written by developers, so the vulnerability only manifests in the non-default, insecure pattern of feeding untrusted input straight into schema construction. The primary limiting factor is this unusual configuration flow, reflected in AC:H and AT:P; impact is confined to altered or broken validation error rendering and corruption of application logic that gates on mere property presence. Vendor workaround: do not pass untrusted input into those APIs, or strip any __proto__/constructor property before doing so; upgrading is the complete fix.

Impact

This is a medium-severity, low-real-world-priority issue despite the network attack vector. The CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) scores 6.3, but the high attack complexity (AC:H), the present attack requirement (AT:P), and the impact profile (VI:L only; VC:N, VA:N) all signal a narrow, low-impact flaw rather than a broadly dangerous one. The GHSA is explicit that this is NOT reachable from data that Joi validates - custom messages are schema-construction configuration normally authored by the application developer, so PR:N reflects the lack of auth on the hypothetical exposed endpoint, not that typical deployments are remotely exploitable. The vuln.today decision label is 'this_month' (not act_now/emergency), and the vulnerability is NOT listed in CISA KEV, consistent with the low urgency. No EPSS score was provided in the input, so probabilistic exploitation likelihood cannot be factored in - this is a data gap. No standalone weaponized exploit is cited, though the vendor patch ships a test that demonstrates the technique. The dominant limiting factor is the unusual and insecure coding pattern required (feeding untrusted input directly into schema construction), which makes widespread exploitation unlikely and points to this being a defense-in-depth hardening fix rather than an active threat.

Exploit ScenarioDerived

An application forwards attacker-controlled JSON directly into Joi schema construction - for example building a schema with user-supplied custom error messages via any().messages() or prefs({ messages }). The attacker submits a payload containing a __proto__ language key (e.g. JSON.parse('{"__proto__":{"number.min":"pwned"}}')), which replaces the compiled messages object's prototype so lookups resolve through inheritance, corrupting validation error rendering and any downstream logic that gates on property presence. No public weaponized exploit is cited, but the vendor's patch includes a working test case demonstrating the exact trigger.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 04, 2026

Prototype replacement in the Joi validation library lets an attacker who controls custom message configuration write onto the messages object's prototype (and, via a 'constructor' key, onto Object statics), so every object in the process may inherit the injected properties. Joi 17.13.6 through 17.13.8 and 18.2.5 through 18.3.0 are affected as described in the CVE record; the vendor advisory documents the underlying defect as present since 17.2.0 and 18.0.0. The flaw is not reachable from data Joi validates - it requires an application that feeds untrusted input directly into schema-construction APIs such as any().messages(), prefs({ messages }), Joi.extend({ messages }) or rule({ message }) - so impact is limited to altered or broken error rendering and to dependent logic that gates on mere property presence. No public exploit code was identified and there is no CISA KEV entry; EPSS was not supplied; the vendor patches are 17.13.9 and 18.3.1.

RemediationAI

Vendor-released patch: upgrade to Joi 17.13.9 on the 17.x branch or 18.3.1 on the 18.x branch, the versions in which the __proto__ rejection assert is present in lib/messages.js; if your dependency graph already sits at 17.13.6 or 18.2.5 from the earlier advisory round, treat those as incomplete and move to the later versions. Users of the legacy npm/@hapi/joi package (16.0.0 through 17.1.1) have no vendor patch per the advisory and should migrate to the maintained joi package. Review the advisory at https://github.com/hapijs/joi/security/advisories/GHSA-6w3j-5fw6-r9vr and the fixing changes at https://github.com/hapijs/joi/pull/3164, https://github.com/hapijs/joi/commit/76f5771e1afe527cfda24be0e1a920ffa54888d6 and https://github.com/hapijs/joi/commit/dae9467cec27e787bfdea8b276595177d52d28ec. The vendor's stated workaround is to stop passing untrusted input into messages(), message(), prefs({ messages }), Joi.extend({ messages }) or rule({ message }), or to strip any __proto__ or constructor property before doing so; the trade-off is that this filtering must be correct and applied at every such call site - JSON.parse output can legitimately contain a literal __proto__ key that naive recursive merge or object-spread checks miss - and upgrading remains the only complete fix. Given the this_month priority and the non-default precondition, schedule the upgrade in the current maintenance window rather than as an emergency change.

Affected VersionsENISA

joi 17.13.6 <17.13.9
joi 18.2.5 <18.3.1

Affected Packages

npm @hapi/joi no fix
npm joi fix: 17.13.6, 17.13.9, 18.2.5, 18.3.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Joi is a widely used Node.js schema validation library; its lib/messages.js compile() and merge() functions build the localized message table used to render validation errors. Both functions iterate the language keys of a caller-supplied messages object and, when a key is named __proto__, previously followed the key through the prototype chain and reused the object found there instead of creating a fresh own property. The result is that the compiled messages object's own prototype is replaced by the attacker's 'language', so message codes resolve through inheritance and attacker-chosen strings are returned for legitimate error codes; a key named 'constructor' similarly writes onto the Object function's statics. This is CWE-1321 (improperly controlled modification of object prototype attributes, i.e. prototype pollution), but in the specific, narrower form of prototype replacement rather than a global Object.prototype write in the reported code path. The commit that addresses it adds an explicit assert(language !== '__proto__', 'Cannot use __proto__ as a language') in both compile() and merge(), with tests asserting that messages(), prefs({ messages }), validate(..., { messages }) and Joi.extend({ messages }) all throw when handed a JSON-parsed payload containing a __proto__ key. Crucially, the injection point is schema construction, not validation: the vendor states this is not reachable from data that Joi validates. The trigger therefore depends entirely on an application passing untrusted objects into the message-configuration surface, which is why the assessed vector carries AC:H and AT:P.

Know when Joi gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 6.3 MEDIUM
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
vuln.today AI 3.7 LOW

AC:H because exploitation needs the unusual flow of untrusted input into schema-construction config; PR:N/UI:N as no app auth or victim action is inherent; integrity-only low impact, no confidentiality or availability loss.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 9 npm packages depend on @hapi/joi (3 direct, 6 indirect)
  • 4 npm packages depend on joi (4 direct, 0 indirect)

Ecosystem-wide dependent count for version 16.0.0 and other introduced versions.

Threat Intelligence Overview

EPSS Score
0.3%
Top 74% exploitable
Prevalence
High
Joi is among the most widely deployed Node.js validation libraries
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
High

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy