LOW3.7
GHSA-wr44-6hxh-3jwq
joi messages compilation allows prototype replacement through __proto__ error codes
Quick fix
GHSA-wr44-6hxh-3jwq — joi: upgrade to the fixed version with the command below.
npm install joi@17.13.8Details
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.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-90771[ADVISORY]
- https://github.com/hapijs/joi/issues/3150[WEB]
- https://github.com/hapijs/joi/pull/3151[WEB]
- https://github.com/hapijs/joi/pull/3153[WEB]
- https://github.com/hapijs/joi/commit/1d2001cad9971327a62c9fd8eb1afec20cd784d2[WEB]
- https://github.com/hapijs/joi/commit/5b8333c9177e08b4ef4ed02903c2d657084e7afb[WEB]
- https://github.com/hapijs/joi[PACKAGE]
- https://github.com/hapijs/joi/blob/v18.2.8/lib/messages.js[WEB]
- https://github.com/hapijs/joi/releases/tag/v17.13.8[WEB]
- https://github.com/hapijs/joi/releases/tag/v18.2.9[WEB]
- https://www.vulncheck.com/advisories/joi-before-17.13.8-and-18.2.9-prototype-pollution-via-messages[WEB]