{"id":"CVE-2022-29078","aliases":["GHSA-phwq-j96m-2c2q"],"url":"https://o3.security/vulnerability/CVE-2022-29078","summary":"ejs template injection vulnerability","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).","published":"2022-04-25T14:13:32Z","modified":"2026-10-20T11:01:23.220506001Z","cvss":{"score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":{"score":0.32808,"percentile":0.98267,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":4,"affectedPackages":[{"ecosystem":"npm","name":"ejs","fixedVersion":"3.1.7"}],"fix":{"url":"https://github.com/mde/ejs/commit/15ee698583c98dadc456639d6245580d17a24baf","label":"mde/ejs@15ee698"},"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"},{"type":"WEB","url":"https://github.com/mde/ejs/commit/15ee698583c98dadc456639d6245580d17a24baf"},{"type":"WEB","url":"https://eslam.io/posts/ejs-server-side-template-injection-rce"},{"type":"PACKAGE","url":"https://github.com/mde/ejs"},{"type":"WEB","url":"https://security.netapp.com/advisory/ntap-20220804-0001"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-20T11:01:23.220506001Z"}}