Vulnerability · Published Apr 25, 2022 · Assigned by mitre
CVE-2022-29078
Critical 9.8
In plain English
A critical-severity security flaw in the node-ejs package (Debian). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 32.8% (higher than 98% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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 & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-ejs | 3.1.7-1 | DEBIAN-CVE-2022-29078 |
| Debian:13 | node-ejs | 3.1.7-1 | DEBIAN-CVE-2022-29078 |
| Debian:14 | node-ejs | 3.1.7-1 | DEBIAN-CVE-2022-29078 |
| Ubuntu:22.04:LTS | node-ejs | no fix listed | UBUNTU-CVE-2022-29078 |
| npm | ejs | 3.1.7 | GHSA-phwq-j96m-2c2q |
Affected products (as reported)
References
- https://github.com/mde/ejs/releases x_refsource_MISC
- https://eslam.io/posts/ejs-server-side-template-injection-rce/ x_refsource_MISC
- https://security.netapp.com/advisory/ntap-20220804-0001/ x_refsource_CONFIRM