Prototype Pollution in hoek
High severity
GitHub Reviewed
Published
Apr 26, 2018
to the GitHub Advisory Database
•
Updated May 29, 2025
Description
Published to the GitHub Advisory Database
Apr 26, 2018
Reviewed
Jun 16, 2020
Last updated
May 29, 2025
Versions of
hoekprior to 4.2.1 and 5.0.3 are vulnerable to prototype pollution.The
mergefunction, and theapplyToDefaultsandapplyToDefaultsWithShallowfunctions which leveragemergebehind the scenes, are vulnerable to a prototype pollution attack when provided an unvalidated payload created from a JSON string containing the__proto__property.This can be demonstrated like so:
This type of attack can be used to overwrite existing properties causing a potential denial of service.
Recommendation
Update to version 4.2.1, 5.0.3 or later.
References