Vulnerability library
Security checkSeptember 08, 2026

joi: Prototype pollution via a `__proto__` language key in custom messages

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Low severitynpmjoi

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

An application that passes attacker-controlled data into joi’s custom message configuration (messages(), message(), prefs({ messages }), Joi.extend({ messages }) or rule({ message })) lets the attacker write properties onto Object.prototype, where every object in the process then inherits them.

Recommendation

Update the joi package to the latest compatible version. Followings are version details:

  • Affected version(s): **>= 18.0.0, < 18.2.5 >= 17.2.0, < 17.13.6**
  • Patched version(s): **18.2.5 17.13.6**

References

Could your website be exposed too?

SmartScanner can check your website for joi: Prototype pollution via a `__proto__` language key in custom messages and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated September 08, 2026