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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | joi | < 17.13.8, >= 18.0.0, < 18.2.9 | 17.13.8, 18.2.9 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-90771
- https://github.com/hapijs/joi/issues/3150
- 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/commit/5b8333c9177e08b4ef4ed02903c2d657084e7afb
- https://github.com/hapijs/joi
- https://github.com/hapijs/joi/blob/v18.2.8/lib/messages.js
- https://github.com/hapijs/joi/releases/tag/v17.13.8
- https://github.com/hapijs/joi/releases/tag/v18.2.9
- https://www.vulncheck.com/advisories/joi-before-17.13.8-and-18.2.9-prototype-pollution-via-messages
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N- Weakness (CWE)
CWE-1321- Platform
- npm
- Package
joi- Disclosed
- 13.09.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-wr44-6hxh-3jwq - CC BY 4.0
Vulnerability history: joi
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 5
- First → latest
- 06.2026 09.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 1
- Medium 2
- Low 2
Disclosures per year
- 2026: 5
-
joi messages compilation allows prototype replacement through __proto__ error codes this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.