{"id":"CVE-2022-29078","details":"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).","aliases":["GHSA-phwq-j96m-2c2q"],"modified":"2026-04-10T04:47:07.337181Z","published":"2022-04-25T15:15:49.887Z","references":[{"type":"ADVISORY","url":"https://github.com/mde/ejs/releases"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20220804-0001/"},{"type":"FIX","url":"https://eslam.io/posts/ejs-server-side-template-injection-rce/"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/mde/ejs","events":[{"introduced":"0"},{"last_affected":"80bf3d7dcc20dffa38686a58b4e0ba70d5cac8a1"}],"database_specific":{"versions":[{"introduced":"0"},{"last_affected":"3.1.6"}]}}],"versions":["v2.0.1","v2.0.2","v2.1.1","v2.1.2","v2.1.3","v2.1.4","v2.2.1","v2.2.2","v2.2.3","v2.2.4","v2.3.1","v2.3.2","v2.3.3","v2.3.4","v2.4.1","v2.4.2","v2.5.1","v2.5.2","v2.5.3","v2.5.4","v2.5.5","v2.5.6","v2.5.7","v2.6.1","v2.6.2","v2.7.1","v3.0.1","v3.0.2","v3.1.2","v3.1.5","v3.1.6"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-29078.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}