Denial-of-Service Vulnerability in Node.js EJS Package (CVE-2017-1000189)

node-ejs Updated 02 Oct 2025

Summary

17/11/2017
N/A
Yes i
High
7.5

CVE-2017-1000189: nodejs ejs version older than 2.5.5 is vulnerable to a denial-of-service due to weak input validation in the ejs.renderFile(). Affects node-ejs across 2 version ranges.

< 2.5.7-1 < 49264e0037e313a0a3e033450b5c184112516d8f

Fixed in 2.5.7-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The EJS (Embedded JavaScript) package is a popular templating engine used in Node.js applications to generate HTML markup with plain JavaScript. It allows developers to create dynamic web pages by embedding JavaScript code within HTML. EJS is widely utilized due to its simplicity and flexibility, making it a common choice for rendering views in web applications. However, certain versions of EJS are vulnerable to a denial-of-service attack due to inadequate input validation in the ejs.renderFile() function, which can lead to application crashes or unresponsiveness.

Vulnerability Detail

The vulnerability identified as CVE-2017-1000189 affects versions of the EJS package prior to 2.5.5. It arises from weak input validation in the ejs.renderFile() method, allowing attackers to craft specific inputs that can overwhelm the server, leading to a denial-of-service condition. This can result in the application becoming unresponsive, affecting user experience and potentially causing downtime. The severity of this vulnerability is rated with a CVSS score of 7.5, indicating a high risk to applications using affected versions of EJS.

How To Fix

Minimum fixed version

2.5.7-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-ejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate upgrading is not feasible, consider implementing input validation on the data being passed to ejs.renderFile() to mitigate the risk of denial-of-service attacks. This can involve sanitizing inputs or limiting the size of the input data.

Conclusion

The CVE-2017-1000189 vulnerability in the EJS package poses a significant risk to applications using affected versions. It is crucial to upgrade to version 2.5.7 or later to mitigate the risk of denial-of-service attacks. Regular monitoring and validation of inputs can further enhance application security.

See every vulnerability recorded for node-ejs →

Share this vulnerability

FAQ

CVE-2017-1000189 is a vulnerability in the EJS templating engine that can lead to denial-of-service attacks due to weak input validation.

EJS versions older than 2.5.5 are vulnerable to this issue.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software without needing to install anything. Simply upload your manifest file like package-lock.json.

Implement input validation on the data passed to ejs.renderFile() as a temporary workaround to reduce the risk of denial-of-service attacks.

The CVSS score of CVE-2017-1000189 is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for node-ejs.

How To Fix

Minimum fixed version

2.5.7-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-ejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback