GitHub Advisoryadvisory · npm
GHSA-phwq-j96m-2c2q ejs template injection vulnerability
CRITICAL
Official page ↗
- Aliases
- CVE-2022-29078
- Ecosystem
- npm
- Packages
- ejs
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-74
- Reviewed
- 2022-04-27
Affected packages
• npm ejs: < 3.1.7 → fixed in 3.1.7
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).
Related
Alias · CVE (1)
- CVE-2022-29078 The ejs (aka Embedded JavaScript templates) package 3.1.6 for Node.js allows server-side template injection in settings[view… vulnerability
Weakness · CWE (1)
- CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-29078 advisory
- https://github.com/mde/ejs/commit/15ee698583c98dadc456639d6245580d17a24baf web
- https://eslam.io/posts/ejs-server-side-template-injection-rce web
- https://github.com/mde/ejs package
- https://github.com/mde/ejs/releases web
- https://security.netapp.com/advisory/ntap-20220804-0001 web