CVE-2026-90771
joi messages compilation allows prototype replacement through __proto__ error codes
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.
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » joivia npm joi | < 17.13.8>= 18.0.0, < 18.2.9 | 17.13.8, 18.2.9 |
| org.webjars.npm » joivia npm joi | < 17.13.8>= 18.0.0, < 18.2.9 | 17.13.8, 18.2.9 |
Blast radius
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2026-90771 | nvd.nist.gov |
| Package | hapijs/joi | github.com |
| Web | hapijs/joi issue #3150 | github.com |
| Web | hapijs/joi pull request #3151 | github.com |
| Web | hapijs/joi pull request #3153 | github.com |
| Web | hapijs/joi commit 1d2001c | github.com |
| Web | hapijs/joi commit 5b8333c | github.com |
| Web | hapijs/joi messages.js | github.com |
| Web | hapijs/joi release v17.13.8 | github.com |
| Web | hapijs/joi release v18.2.9 | github.com |
| Web | advisories/joi-before-17.13.8-and-18.2.9-prototype-pollution-via-messages | vulncheck.com |
