{"id":"CVE-2026-122131","kind":"vulnerability","aliases":["CVE-2026-122131"],"related":[],"title":"Joi: prototype pollution via untrusted __proto__ message language key","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.","summary":"Joi, a JavaScript validation library, fails to reject a __proto__ language key when compiling messages, so attacker-supplied message configuration can replace the messages prototype. The result is altered or broken validation error rendering and dependent logic.","severity":"medium","cvss":6.3,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["backend","javascript","joi","node.js","package"],"not_affected_if":["fixed-schemas","no-user-supplied-messages","versions-outside-range"],"how_to_check":"- Check the installed Joi version with `npm ls joi` and compare it against the affected ranges 17.13.6 to before 17.13.9 and 18.2.5 to before 18.3.1.\n- Search the code for `any().messages(`, `.prefs(`, `Joi.extend` or validate options that take user-supplied objects.","fix":"- Joi 17.x: move to `17.13.9` or later.\n- Joi 18.x: move to `18.3.1` or later.","status":"open","published_at":"2026-11-04T21:18:08+00:00","first_seen_at":"2026-11-04T21:49:19+00:00","triaged_at":"2026-11-04T21:51:14+00:00","updated_at":"2026-11-04T21:51:14+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-11-04T21:51:14Z","model":"claude-haiku-5-5","output":{"fix":"- Joi 17.x: move to `17.13.9` or later.\n- Joi 18.x: move to `18.3.1` or later.","reach":"unknown","title":"Joi: prototype pollution via untrusted __proto__ message language key","impact":"medium","summary":"Joi, a JavaScript validation library, fails to reject a __proto__ language key when compiling messages, so attacker-supplied message configuration can replace the messages prototype. The result is altered or broken validation error rendering and dependent logic.","audience":"developers","category":"package","nicknames":[],"who_cares":["node.js","joi","javascript","backend"],"confidence":0.7,"fix_status":"available","needs_auth":"unknown","worst_case":"Attacker alters validation error messages and dependent logic in the app","analyst_note":"","how_to_check":"- Check the installed Joi version with `npm ls joi` and compare it against the affected ranges 17.13.6 to before 17.13.9 and 18.2.5 to before 18.3.1.\n- Search the code for `any().messages(`, `.prefs(`, `Joi.extend` or validate options that take user-supplied objects.","plain_action":"","needs_analyst":false,"not_affected_if":["fixed-schemas","no-user-supplied-messages","versions-outside-range"],"who_is_affected":"Applications that pass untrusted input into Joi message configuration, such as custom messages, prefs, validate options or Joi.extend, are exposed. Apps that only use fixed, developer-written schemas and messages are much less exposed. unknown whether any specific data path is exploitable beyond the prototype change described.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"medium"},"cost_usd":0.000724,"input_tokens":4256,"output_tokens":596,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-122131':12A,15A '-2026':11A,14A '17.13.6':60C '17.13.9':62C '18.2.5':64C '18.3.1':66C 'alter':50B,104C 'attack':38B,85C 'attacker-suppli':37B 'backend':16B 'break':106C 'broken':52B 'compil':34B,74C,101C 'configur':41B,89C 'contain':67C 'cve':10A,13A 'depend':57B,111C 'error':54B,108C 'fail':26B,78C 'javascript':17B,23B 'joi':1A,18B,21B,59C 'joi.extend':97C 'key':9A,32B,84C 'languag':8A,31B,83C 'lib/messages.js':73C 'librari':25B 'logic':58B,112C 'merg':76C 'messag':7A,35B,40B,45B,88C,92C,102C 'node.js':19B 'option':95C 'packag':20B 'pollut':3A,70C 'pref':93C 'proto':6A,30B,82C 'prototyp':2A,46B,69C,103C 'reject':28B,80C 'render':55B,109C 'replac':43B,99C 'result':48B 'suppli':39B,86C 'untrust':5A,87C 'valid':24B,53B,94C,107C 'via':4A,90C 'vulner':71C","nicknames":[],"mitigations":[],"who_affected":"Applications that pass untrusted input into Joi message configuration, such as custom messages, prefs, validate options or Joi.extend, are exposed. Apps that only use fixed, developer-written schemas and messages are much less exposed. unknown whether any specific data path is exploitable beyond the prototype change described.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["backend","javascript","joi","medium","nodejs","package"],"campaign_type":null,"first_public_at":"2026-08-19T17:52:17+00:00","kev":null,"cvss_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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-122131","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-122131","severity":null,"published_at":"2026-11-04T21:18:08+00:00","modified_at":"2026-11-04T21:18:08+00:00","first_seen_at":"2026-11-04T21:49:19+00:00","fetched_at":"2026-11-04T21:49:19+00:00","note":null}],"documents":[{"id":70652,"url":"https://github.com/hapijs/joi/commit/76f5771e1afe527cfda24be0e1a920ffa54888d6","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":70653,"url":"https://github.com/hapijs/joi/commit/dae9467cec27e787bfdea8b276595177d52d28ec","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":70654,"url":"https://github.com/hapijs/joi/security/advisories/GHSA-6w3j-5fw6-r9vr","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-08-19T17:52:17+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"},{"id":70655,"url":"https://www.vulncheck.com/advisories/joi-17.13.6-before-17.13.9-and-18.2.5-before-18.3.1-prototype-replacement-via-proto-language-key","title":"Third-party advisory: www.vulncheck.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: www.vulncheck.com"}],"exploit_sources":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}