CVE-2026-90771: joi messages compilation allows prototype replacement through __proto__ error codes
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.
Published Sep 13, 2026 · Updated Oct 5, 2026
Affected packages
joi
- Ecosystem
- npm
- Affected
- < 17.13.8
- Fixed in
- 17.13.8
- Check
npm ls joi
joi
- Ecosystem
- npm
- Affected
- >= 18.0.0, < 18.2.9
- Fixed in
- 18.2.9
- Check
npm ls joi
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-90771
- https://github.com/hapijs/joi/issues/3150
- https://github.com/hapijs/joi/commit/5b8333c9177e08b4ef4ed02903c2d657084e7afb
- https://github.com/hapijs/joi
- https://github.com/hapijs/joi/blob/v18.2.8/lib/messages.js
- https://www.vulncheck.com/advisories/joi-before-17.13.8-and-18.2.9-prototype-pollution-via-messages
- https://github.com/hapijs/joi/pull/3151
- https://github.com/hapijs/joi/pull/3153
- https://github.com/hapijs/joi/commit/1d2001cad9971327a62c9fd8eb1afec20cd784d2
- https://github.com/hapijs/joi/releases/tag/v17.13.8
- https://github.com/hapijs/joi/releases/tag/v18.2.9
- https://github.com/advisories/GHSA-wr44-6hxh-3jwq
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-118772
joi: quadratic-time split in `string().email({ multiple: true })` allows denial of service
high7.5No fixOct 30, 2026CVE-2026-92599
joi: Quadratic regular-expression backtracking in `Joi.string().isoDate()`
high7.5Sep 29, 2026CVE-2026-84367
joi: object().rename() with a template target can set the validated object's prototype
low3.7Sep 8, 2026CVE-2026-84368
joi: Prototype pollution via a `__proto__` language key in custom messages
low3.7No fixSep 8, 2026CVE-2026-48038
joi has an uncaught RangeError on deeply nested input through recursive `link()` schemas
medium5.3Jun 11, 2026
