AploSec / Disclosures / 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
CVE-2026-122131 · published 2026-11-04
In plain words: this type of bug lets someone change parts of the application's data they should not be able to set (prototype pollution or mass assignment). A fixed release is listed.
Summary
CVE-2026-122131 affects joi (npm) >= 17.13.6, < 17.13.9; >= 18.2.5, < 18.3.1: Prototype replacement via a __proto__ messages language key (CWE-1321). Fixed in 17.13.9, 18.3.1. CVSS 4.0 base score 6.3 (Medium), assigned by VulnCheck. Published 2026-11-04 by VulnCheck. Credit: Zachariah Mithani, Marsup.
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.
Evidence
The maintainer accepted the patch submitted with the report and merged the fix.
Remediation
Upgrade joi to the fixed release on your line: 17.13.9, 18.3.1. Releases in the affected ranges (>= 17.13.6, < 17.13.9; >= 18.2.5, < 18.3.1) are vulnerable. See the linked advisory for details on affected release lines.
Timeline
- 2026-11-04 CVE published
- 2026-11-07 Public record last updated
References
- VulnCheck advisoryhttps://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
- Referencehttps://github.com/hapijs/joi/security/advisories/GHSA-6w3j-5fw6-r9vr
- Fix pull requesthttps://github.com/hapijs/joi/pull/3164
- Fix commithttps://github.com/hapijs/joi/commit/76f5771e1afe527cfda24be0e1a920ffa54888d6
- Fix commithttps://github.com/hapijs/joi/commit/dae9467cec27e787bfdea8b276595177d52d28ec
- CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-122131
- NVD recordhttps://nvd.nist.gov/vuln/detail/CVE-2026-122131
- Severity
- Medium 6.3CVSS 4.0, scored by VulnCheck in the CVE record
- Package
- joi
- Ecosystem
- npm
- Affected
- >= 17.13.6, < 17.13.9; >= 18.2.5, < 18.3.1
- Fixed
- 17.13.9, 18.3.1
- Weakness
- CWE-1321
- CNA
- VulnCheck
- Credit
- Zachariah MithanifinderMarsupremediation developer