{"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-07-08T05:57:53.746038664Z","published":"2022-04-25T14:13:32Z","database_specific":{"cna_assigner":"mitre","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29078.json"},"references":[{"type":"WEB","url":"https://eslam.io/posts/ejs-server-side-template-injection-rce/"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29078.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29078"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20220804-0001/"},{"type":"PACKAGE","url":"https://github.com/mde/ejs/releases"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/mde/ejs","events":[{"introduced":"80bf3d7dcc20dffa38686a58b4e0ba70d5cac8a1"},{"last_affected":"80bf3d7dcc20dffa38686a58b4e0ba70d5cac8a1"}],"database_specific":{"extracted_events":[{"introduced":"3.1.6"},{"last_affected":"3.1.6"}],"source":"CPE_STRING","cpe":"cpe:2.3:a:ejs:ejs:3.1.6:*:*:*:*:node.js:*:*"}}],"versions":["3.1.6","v3.1.6"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-29078.json"}}],"schema_version":"1.7.5"}