CVE-2017-1000189: Ejs Denial of Service Vulnerability
HIGHCVE-2017-1000189 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-20: Improper Input Validation) affecting Ejs libraries in the npm ecosystem. The issue involves ejs vulnerable to dos due to weak input validation. Remediation is available by upgrading affected packages to version 2.5.5.
CVE-2017-1000189 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-1000189
To remediate this vulnerability, upgrade all affected Ejs 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 ejs@2.5.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls ejs
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-1000189, inspect your project dependencies using npm:
npm ls ejs
Analyze the terminal output to locate any version of Ejs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.5.5), your application is affected.
Note: The npm ls ejs 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Ejs, 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-1000189 Affected Ejs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ejs
|
npm |
< 2.5.5
|
2.5.5
|
References
Frequently Asked Questions
What is CVE-2017-1000189?
Which Ejs versions are affected?
What version fixes CVE-2017-1000189?
Is ejs affected?
What is the CVSS score of CVE-2017-1000189?
What CWE is associated with CVE-2017-1000189?
How can I check npm dependencies for CVE-2017-1000189?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6x77-rpqf-j6mw",
"modified" : "2023-09-08T21:00:26Z",
"published" : "2018-03-05T18:54:33Z",
"aliases" : [ "CVE-2017-1000189" ],
"summary" : "ejs vulnerable to DoS due to weak input validation",
"details" : "nodejs ejs version older than 2.5.5 is vulnerable to a denial-of-service due to weak input validation in `ejs.renderFile()`",
"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" : "ejs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.5.5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-1000189"
}, {
"type" : "WEB",
"url" : "https://github.com/mde/ejs/commit/49264e0037e313a0a3e033450b5c184112516d8f"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-6x77-rpqf-j6mw"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mde/ejs"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20171123041449/http://www.securityfocus.com/bid/101893"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:20:34Z",
"nvd_published_at" : null
}
}