Prototype Pollution in hoek
High severity
GitHub Reviewed
Published
Apr 26, 2018
to the GitHub Advisory Database
•
Updated Sep 13, 2023
Description
Published to the GitHub Advisory Database
Apr 26, 2018
Reviewed
Jun 16, 2020
Last updated
Sep 13, 2023
Versions of
hoek
prior to 4.2.1 and 5.0.3 are vulnerable to prototype pollution.The
merge
function, and theapplyToDefaults
andapplyToDefaultsWithShallow
functions which leveragemerge
behind 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