Intel

AIKIDO-2026-220705

joi is vulnerable to Prototype Pollution

Prototype PollutionCVE-2026-90771 Published Yesterday

63

Medium Risk

This Affects:

JSjoi
16.0.0 - 17.13.7
Fixed in 17.13.8
18.0.0 - 18.2.8
Fixed in 18.2.9
Are you affected? Scan for Free

TL;DR

Joi's message compilation and merging logic in lib/messages.js accepts a message code named __proto__ and assigns it directly onto a plain messages object. Because the assigned value is always wrapped in a Template instance, the inherited __proto__ accessor replaces the object's own prototype instead of creating a property, so every other message code then resolves through that same template. Custom messages passed through .messages(), .prefs(), .validate(), and Joi.extend() can all reach this path in both flat and language-scoped message maps. The fix rejects __proto__ as a message code across all four entry points.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application passes externally influenced message codes into .messages(), .prefs(), .validate(), or Joi.extend().

Background info

joi is vulnerable to Prototype Pollution in versions 16.0.0 - 17.13.7 and 18.0.0 - 18.2.8.

How to fix this

Upgrade the joi library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform