Intel

AIKIDO-2026-368003

joi is vulnerable to Prototype Pollution

Prototype PollutionGHSA-6w3j-5fw6-r9vr Published Aug 27, 2026

37

Low Risk

This Affects:

JSjoi
17.1.1 - 17.13.5
Fixed in 17.13.6
18.0.0 - 18.2.4
Fixed in 18.2.5
Are you affected? Scan for Free

TL;DR

joi compiles custom validation messages into a target object keyed by the language name inside its messages module. Before the fix, a language name of __proto__ or constructor causes joi to reuse an inherited object, so writing the localized messages assigns properties onto Object.prototype or other shared objects. This lets prototype pollution occur when an application builds a schema, message override, or extension from untrusted configuration, affecting every object in the process. The fix requires an own property on the target before writing and otherwise allocates a fresh object.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application constructs joi schemas, message overrides, or extensions from untrusted configuration.

Background info

joi is vulnerable to Prototype Pollution in versions 17.1.1 - 17.13.5 and 18.0.0 - 18.2.4.

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