mde/ejs · Security
ejs template injection vulnerability
- GHSA ID
- GHSA-phwq-j96m-2c2q
- CVE ID
- CVE-2022-29078
- Severity
- critical
- Published
- Updated
- CVSS
- 9.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CVSS v3
- 9.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
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).
CWEs
- CWE-74 · Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-29078 ↗
- https://eslam.io/posts/ejs-server-side-template-injection-rce/ ↗
- https://github.com/mde/ejs/commit/15ee698583c98dadc456639d6245580d17a24baf ↗
- https://github.com/mde/ejs/releases ↗
- https://security.netapp.com/advisory/ntap-20220804-0001/ ↗
- https://github.com/advisories/GHSA-phwq-j96m-2c2q ↗