Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach endpoint feeding untrusted schema config
-
DeliverySupply message object with __proto__ language key
-
Exploitcompile()/merge() reuses inherited prototype object
-
ExecutionCompiled messages prototype replaced
-
ImpactValidation 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
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- 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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Joi, the JavaScript schema validation library published on npm as joi (17.1.1 through 17.13.8, and 18.0.0 through 18.3.0
Prototype pollution in hapijs/joi's messages compilation function allows network-reachable attackers to replace an objec
Limited prototype pollution in joi's object().rename() allows unauthenticated remote attackers to set the prototype of t
Prototype pollution in joi, one of the most widely used JavaScript schema-validation libraries (versions 16.0.0 through
EUVD-2026-117085
GHSA-gw37-7cc7-xmm6
NVD
CVE.org
EPSS
Exploit-DB