CVE-2017-1000228 ejs is vulnerable to remote code execution due to weak input validation

Critical 9.8 Published Updated

Remote attackers can execute arbitrary code via weak input validation in the ejs.renderFile function of the EJS template library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2017-1000228?

CVE-2017-1000228 is a critical code injection vulnerability in n/a, published on 17 Nov 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

nodejs ejs versions older than 2.5.3 is vulnerable to remote code execution due to weak input validation in ejs.renderFile() function

Weakness: CWE-20

Which versions are affected by CVE-2017-1000228?

2 open source packages ship an affected version, including ejs. It affects 1 product.

PackageAffectedFixed in
ejs npmAll versions2.5.5
ejs npmAll versions2.5.5

Products include Ejs Ejs.

How do I fix CVE-2017-1000228?

Upgrade ejs to 2.5.5 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2017-1000228 being exploited?

There is no known exploitation of CVE-2017-1000228 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2017-1000228, GHSA-3w5v-p54c-f74x.

Is CVE-2017-1000228 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free