VDB
Sign up
LOW3.7

GHSA-wr44-6hxh-3jwq

joi messages compilation allows prototype replacement through __proto__ error codes

Quick fix

GHSA-wr44-6hxh-3jwq — joi: upgrade to the fixed version with the command below.

npm install joi@17.13.8

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/joi
Introduced in: 0Fixed in: 17.13.8
Fixnpm install joi@17.13.8
npm/joi
Introduced in: 18.0.0Fixed in: 18.2.9
Fixnpm install joi@18.2.9

References