CVE-2022-29078
CRITICAL9.8EPSS 93.5%ejs template injection vulnerability
Published: 4/26/2022Modified: 4/28/2026
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 packages (2)
- Debian/node-ejsfrom 0, < 2.5.7-3+deb11u1
- npm/ejsfrom 0, < 3.1.7
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | CRITICAL9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
References (7)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2022-29078
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2022-29078
- PATCHhttps://github.com/mde/ejs
- WEBhttps://eslam.io/posts/ejs-server-side-template-injection-rce
- WEBhttps://github.com/mde/ejs/commit/15ee698583c98dadc456639d6245580d17a24baf
- WEBhttps://github.com/mde/ejs/releases
- WEBhttps://security.netapp.com/advisory/ntap-20220804-0001