What’s Vulnerable › Vulnerabilities
CVE-2022-29078: ejs template injection vulnerability
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 32.8% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-04-25 · updated 2026-06-17
- Weakness: CWE-94
Description
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 products
How to fix
Upgrade to a fixed version: Npm Ejs 3.1.7. Check the vendor advisory for mitigations.
References
- https://eslam.io/posts/ejs-server-side-template-injection-rce/
- https://github.com/mde/ejs/releases
- https://security.netapp.com/advisory/ntap-20220804-0001/
- https://eslam.io/posts/ejs-server-side-template-injection-rce/
- https://github.com/mde/ejs/releases
- https://security.netapp.com/advisory/ntap-20220804-0001/
Get alerted when CVE-2022-29078 or the next vulnerability affects your stack