CVE-2026-90771: joi Prototype Pollution via __proto__ Error Codes

joi Updated 06 Oct 2026

Summary

13/09/2026
Yes i
Moderate
3.7

CVE-2026-90771: joi messages compilation allows prototype replacement through proto error codes. Affects joi across 2 version ranges.

< 17.13.8 >= 18.0.0, < 18.2.9

Fixed in 17.13.8 or 18.2.9, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

joi is a popular JavaScript library used for schema validation, allowing developers to define and validate object structures easily. It provides a powerful and flexible way to ensure that data conforms to expected formats, making it widely adopted in Node.js applications. However, certain versions of joi are vulnerable to a prototype pollution issue that can compromise application security.

Vulnerability Detail

The vulnerability arises from the messages compilation function in joi, which improperly handles error codes that include proto. This allows attackers to inject proto keys in custom messages, leading to prototype pollution. As a result, the prototype of objects returned by joi can be altered, potentially breaking downstream code that relies on standard Object.prototype methods. This can lead to unexpected behavior and security issues in applications that utilize joi for validation.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 17.13.8 17.13.8
    npm install joi@17.13.8
  • >= 18.0.0, < 18.2.9 18.2.9
    npm install joi@18.2.9

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If you cannot immediately update the joi package, consider reviewing and sanitizing any custom error messages to ensure they do not include proto keys. This can help mitigate the risk of prototype pollution until an update can be applied.

Conclusion

The joi library has a prototype pollution vulnerability that can be exploited through custom error messages. It is crucial to update to the patched versions to secure your applications. Additionally, consider using tools like Vulert to monitor for vulnerabilities in your dependencies.

See every vulnerability recorded for joi →

Share this vulnerability

FAQ

Prototype pollution is a security vulnerability that allows an attacker to modify the prototype of built-in objects in JavaScript, potentially leading to unexpected behavior in applications.

Versions of joi prior to 17.13.8 and 18.2.9 are affected by this prototype pollution vulnerability.

You can use Vulert, a tool that monitors and alerts for open-source vulnerabilities in your software. By analyzing your package-lock.json file, Vulert can help identify if your application is affected by this vulnerability.

If an immediate update is not possible, review and sanitize any custom error messages to avoid including proto keys, which can help mitigate the risk until an update is applied.

The CVSS score for this vulnerability is 3.7, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for joi.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 17.13.8 17.13.8
    npm install joi@17.13.8
  • >= 18.0.0, < 18.2.9 18.2.9
    npm install joi@18.2.9

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback