Vulnerabilities in pkg:npm/hapi
PACKAGECVE-2017-16013 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Hapi libraries in the npm ecosystem. The issue involves denial of service via malformed accept-encoding header in hapi. Remediation is available by upgrading affected packages to version 16.1.1.
pkg:npm/hapi
Vulnerability advisories affecting package pkg:npm/hapi. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-cqjg-whmm-8gv6 | CVE-2017-16013 | HIGH | Denial of Service via malformed accept-encoding header in hapi |
| GHSA-363h-vj6q-3cmj | CVE-2014-4671 | MODERATE | Rosetta-Flash JSONP Vulnerability in hapi |
| GHSA-cqr7-78pj-3g7j | CVE-2014-3742 | HIGH | File Descriptor Leak Can Cause DoS Vulnerability in hapi |
| GHSA-7hx8-2rxv-66xv | - | HIGH | Denial of Service in hapi |
| GHSA-j3g2-m5jj-6336 | CVE-2015-9243 | MODERATE | Unsafe Merging of CORS Configuration Conflict in hapi |
| GHSA-rc8h-3fv6-pxv8 | CVE-2015-9241 | HIGH | Denial of Service in hapi |
| GHSA-vwrf-r5r4-7775 | CVE-2015-9236 | MODERATE | Incorrect handling of CORS preflight request headers in hapi |
CVE-2017-16013 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2017-16013
To remediate this vulnerability, upgrade all affected Hapi 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@16.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls hapi
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-16013, inspect your project dependencies using npm:
npm ls hapi
Analyze the terminal output to locate any version of Hapi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 16.1.1), your application is affected.
Note: The npm ls hapi 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Hapi, 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-2017-16013 Affected Hapi Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
hapi
|
npm |
≥ 15.0.0
< 16.1.1
|
16.1.1
|
References
Frequently Asked Questions
What is CVE-2017-16013?
Which Hapi versions are affected?
What version fixes CVE-2017-16013?
Is hapi affected?
What is the CVSS score of CVE-2017-16013?
What CWE is associated with CVE-2017-16013?
How can I check npm dependencies for CVE-2017-16013?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cqjg-whmm-8gv6",
"modified" : "2023-09-07T20:33:05Z",
"published" : "2018-10-09T00:57:28Z",
"aliases" : [ "CVE-2017-16013" ],
"summary" : "Denial of Service via malformed accept-encoding header in hapi",
"details" : "Affected versions of `hapi` will crash or lock the event loop when a malformed `accept-encoding` header is recieved.\n\n\n## Recommendation\n\nUpdate to version 16.1.1 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "hapi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.0.0"
}, {
"fixed" : "16.1.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 16.1.0"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16013"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/hapi/issues/3466"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-cqjg-whmm-8gv6"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/335"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:32:25Z",
"nvd_published_at" : null
}
}