Patchfirst
CVE-2022-29078 Public exploit EPSS 32.8%

The ejs (aka Embedded JavaScript templates) package 3.1.6 for Node.js allows server-side template injection in…

Fix:upgrade ejs to 3.1.7 or later Details ↓

Summary

The ejs (Embedded JavaScript templates) package version 3.1.6 for Node.js contains a server-side template injection flaw in the settings[view options][outputFunctionName] option, which is parsed as an internal option. An attacker who can control this option can overwrite outputFunctionName with an arbitrary operating system command, which is then executed when the template is compiled.

Official description · CVE.org

The ejs (aka Embedded JavaScript templates) package 3.1.6 for Node.js allows server-side template injection in settings[view options][outputFunctionName]. This is parsed as an internal option, and overwrites the outputFunctionName option with an arbitrary OS command (which is executed upon template compilation).

Breakdown
60.8 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 2 years after disclosure. Public exploit code (PoC-in-GitHub) appeared 3 months after disclosure.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+3 mo
  3. First seen exploitedVulnCheck KEV evidence+2 yrs

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: ejs.

Upgrade to 3.1.7 or later

npmnpm install ejs@3.1.7

The first fix for CVE-2022-29078. No other CVE tracked by Patchfirst affects this package.

Affected versions

If you runUpgrade to
All versions before 3.1.73.1.7

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 2 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

3 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close