Description
joi before versions 17.13.8 and 18.2.9 contains a prototype pollution vulnerability in the messages compilation function that accepts __proto__ as an error code. Attackers can supply __proto__ keys in custom messages to replace the returned object's prototype, breaking downstream code relying on Object.prototype methods.
Severity (CVSS)
| Base score | 6.3 |
|---|---|
| Severity | Medium |
| Version | CVSS 4.0 |
| 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 |
| Provided by | CNA |
Weaknesses
- CWE-1321 — Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| hapijs | joi | 16.0.0 to <17.13.8; 18.0.0 to <18.2.9 |
References
- https://github.com/hapijs/joi/issues/3150 (issue-tracking)
- https://github.com/hapijs/joi (product)
- https://github.com/hapijs/joi/blob/v18.2.8/lib/messages.js (technical-description)
- https://github.com/hapijs/joi/commit/5b8333c9177e08b4ef4ed02903c2d657084e7afb (patch)
- https://www.vulncheck.com/advisories/joi-before-17.13.8-and-18.2.9-prototype-pollution-via-messages (third-party-advisory)
Generated from the official CVE List on 14 Sep 2026 07:02 UTC.