CVE-2022-29078: Code Injection
A Command injection attack was found in ejs (Embedded JavaScript templates) for Node.js, which allows an attacker to execute 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 executed upon template compilation.
Other sources
Node.js ejs module could allow a remote attacker to execute arbitrary code on the system, caused by a server-side template injection flaw in settings[view options][outputFunctionName]. By sending a specially-crafted HTTP request to overwrites the outputFunctionName option with an arbitrary OS command, an attacker could exploit this vulnerability to execute arbitrary code on the system.
— IBM
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).
Affected Software
Remediation
Event History
Frequently Asked Questions
What is CVE-2022-29078?
CVE-2022-29078 is a vulnerability in the ejs (aka Embedded JavaScript templates) package 3.1.6 for Node.js that allows a remote attacker to execute arbitrary code on the system through server-side template injection.
What is the severity of CVE-2022-29078?
CVE-2022-29078 has a severity level of 9.8, which is classified as critical.
How does CVE-2022-29078 affect the Ejs Ejs package version 3.1.6 for Node.js?
CVE-2022-29078 affects the Ejs Ejs package version 3.1.6 for Node.js by allowing a remote attacker to execute arbitrary code on the system through a server-side template injection flaw in settings[view options][outputFunctionName].
How can I fix CVE-2022-29078?
To fix CVE-2022-29078, it is recommended to upgrade to version 3.1.7 of the Ejs package for Node.js.
Which software versions are affected by CVE-2022-29078?
CVE-2022-29078 affects Ejs Ejs package version 3.1.6 for Node.js, as well as IBM Cognos Analytics versions 11.2.x and 11.1.x.