CVE-2022-29078: Code Injection

Published Apr 25, 2022
·
Updated

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

4 affected componentsFixes available
redhat/ejs<3.1.7
3.1.7
ejs Ejs Node.js=3.1.6
IBM Cognos Analytics<=11.2.0 - 11.2.2
IBM Cognos Analytics<=11.1.0 - 11.1.6 FP4

Event History

Apr 25, 2022
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityWeakness
CVE Published
via MITRE·02:13 PM
Data Sourced
via MITRE·02:13 PM
Description
Feb 23, 2026
Data Sourced
via IBM·11:32 PM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

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.

2

What is the severity of CVE-2022-29078?

CVE-2022-29078 has a severity level of 9.8, which is classified as critical.

3

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].

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203