Vulnerabilities in pkg:npm/@hapi/hoek
PACKAGECVE-2020-36604 is a HIGH (CVSS 8.1) hoek subject to prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting @hapi/hoek libraries in the npm ecosystem. The issue involves hoek subject to prototype pollution via the clone function.. Remediation is available by upgrading affected packages to version 8.5.1, 9.0.3.
pkg:npm/@hapi/hoek
Vulnerability advisories affecting package pkg:npm/@hapi/hoek. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-c429-5p7v-vgjp | CVE-2020-36604 | HIGH | hoek subject to prototype pollution via the clone function. |
| GHSA-22h7-7wwg-qmgg | - | LOW | Prototype Pollution in @hapi/hoek |
CVE-2020-36604 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2020-36604
To remediate this vulnerability, upgrade all affected @hapi/hoek dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @hapi/hoek@8.5.1
npm install @hapi/hoek@9.0.3
npm install hoek@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @hapi/hoek
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-36604, inspect your project dependencies using npm:
npm ls @hapi/hoek
Analyze the terminal output to locate any version of @hapi/hoek in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.5.1), your application is affected.
Note: The npm ls @hapi/hoek command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In @hapi/hoek, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-36604 Affected @hapi/hoek Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@hapi/hoek
|
npm |
< 8.5.1
|
8.5.1
|
|
@hapi/hoek
|
npm |
≥ 9.0.0
< 9.0.3
|
9.0.3
|
|
hoek
|
npm |
≤ 6.1.3
|
|
References
Frequently Asked Questions
What is CVE-2020-36604?
Which @hapi/hoek versions are affected?
What version fixes CVE-2020-36604?
Is @hapi/hoek affected?
Is hoek affected?
What is the CVSS score of CVE-2020-36604?
What CWE is associated with CVE-2020-36604?
How can I check npm dependencies for CVE-2020-36604?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c429-5p7v-vgjp",
"modified" : "2025-05-28T19:35:05Z",
"published" : "2022-09-25T00:00:27Z",
"aliases" : [ "CVE-2020-36604" ],
"summary" : "hoek subject to prototype pollution via the clone function.",
"details" : "hoek versions prior to 8.5.1, and 9.x prior to 9.0.3 are vulnerable to prototype pollution in the clone function. If an object with the __proto__ key is passed to clone() the key is converted to a prototype. This issue has been patched in version 9.0.3, and backported to 8.5.1.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@hapi/hoek"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "8.5.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@hapi/hoek"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.0.0"
}, {
"fixed" : "9.0.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "hoek"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "6.1.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-36604"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/hoek/issues/352"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/hoek/commit/4d0804bc6135ad72afdc5e1ec002b935b2f5216a"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/hoek/commit/948baf98634a5c206875b67d11368f133034fa90"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-09-29T14:13:31Z",
"nvd_published_at" : "2022-09-23T06:15:00Z"
}
}