CVE-2014-3742: Hapi Denial of Service Vulnerability
HIGHCVE-2014-3742 is a HIGH denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Hapi libraries in the npm ecosystem. The issue involves file descriptor leak can cause dos vulnerability in hapi. Remediation is available by upgrading affected packages to version 2.2.0.
CVE-2014-3742 at a Glance
How to Fix CVE-2014-3742
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@2.2.0
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-2014-3742, 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 2.2.0), 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-2014-3742 Affected Hapi Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
hapi
|
npm |
≥ 2.0.0
< 2.2.0
|
2.2.0
|
References
Frequently Asked Questions
What is CVE-2014-3742?
Which Hapi versions are affected?
What version fixes CVE-2014-3742?
Is hapi affected?
What CWE is associated with CVE-2014-3742?
How can I check npm dependencies for CVE-2014-3742?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cqr7-78pj-3g7j",
"modified" : "2021-09-09T20:31:02Z",
"published" : "2017-10-24T18:33:36Z",
"aliases" : [ "CVE-2014-3742" ],
"summary" : "File Descriptor Leak Can Cause DoS Vulnerability in hapi",
"details" : "Versions 2.0.x and 2.1.x of hapi are vulnerable to a denial of service attack via a file descriptor leak. \n\nWhen triggered repeatedly, this leak will cause the server to run out of file descriptors and the node process to die. The effort required to take down a server depends on the process file descriptor limit. No other side effects or exploits have been identified.\n\n\n\n## Recommendation\n\n- Please upgrade to version 2.2.x or above as soon as possible.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "hapi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2014-3742"
}, {
"type" : "WEB",
"url" : "https://github.com/spumko/hapi/issues/1427"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-cqr7-78pj-3g7j"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/spumko/hapi"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/11"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2014/05/13/1"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2014/05/15/2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:32:30Z",
"nvd_published_at" : null
}
}