{"id":"CVE-2022-29078","aliases":["CLSA-2026-1774570929","CLSA-2026-1774570931","DEBIAN-CVE-2022-29078","EUVD-2022-1801","GHSA-phwq-j96m-2c2q","ROOT-APP-NPM-CVE-2022-29078","UBUNTU-CVE-2022-29078"],"status":"published","title":"ejs template injection vulnerability","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).","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.32808,"percentile":0.98364,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-74","CWE-94"],"published":"2022-04-25T14:13:32Z","modified":"2026-11-03T08:04:07Z","exploits":[{"source":"pocgithub","id":"miko550/CVE-2022-29078","title":"miko550/CVE-2022-29078","date":"2022-07-20","url":"https://github.com/miko550/CVE-2022-29078"},{"source":"pocgithub","id":"shurochka1396/expluatation_CVE-2022-29078","title":"shurochka1396/expluatation_CVE-2022-29078","date":"2023-07-26","url":"https://github.com/shurochka1396/expluatation_CVE-2022-29078"},{"source":"pocgithub","id":"l0n3m4n/CVE-2022-29078","title":"l0n3m4n/CVE-2022-29078","date":"2024-11-05","url":"https://github.com/l0n3m4n/CVE-2022-29078"},{"source":"pocgithub","id":"chuckdu21/CVE-2022-29078","title":"chuckdu21/CVE-2022-29078","date":"2025-01-07","url":"https://github.com/chuckdu21/CVE-2022-29078"},{"source":"pocgithub","id":"AlonNavon/npm-demo","title":"AlonNavon/npm-demo","date":"2026-02-15","url":"https://github.com/AlonNavon/npm-demo"},{"source":"pocgithub","id":"amusedx/CVE-2022-29078","title":"amusedx/CVE-2022-29078","date":"2026-04-12","url":"https://github.com/amusedx/CVE-2022-29078"},{"source":"pocgithub","id":"test-avm-714877d2df585126/C-test-2","title":"test-avm-714877d2df585126/C-test-2","date":"2026-06-24","url":"https://github.com/test-avm-714877d2df585126/C-test-2"},{"source":"pocgithub","id":"test-avm-714877d2df585126/vuln-ejs-critical","title":"test-avm-714877d2df585126/vuln-ejs-critical","date":"2026-06-24","url":"https://github.com/test-avm-714877d2df585126/vuln-ejs-critical"},{"source":"pocgithub","id":"taka3636/CVE-2022-29078","title":"taka3636/CVE-2022-29078","date":"2026-07-11","url":"https://github.com/taka3636/CVE-2022-29078"},{"source":"nuclei","id":"CVE-2022-29078","title":"Node.js Embedded JavaScript 3.1.6 - Template Injection","type":"detection template","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-29078.yaml"}],"fixes":[{"ecosystem":"npm","package":"ejs","fixed_in":["3.1.7"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"node-ejs","fixed_in":["3.1.7-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"node-ejs","fixed_in":["3.1.7-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-ejs","fixed_in":["3.1.7-1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/ejs","fixed_in":["2.7.4-root.io.1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"ejs","fixed_in":["2.7.4-aikido.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"ejs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.7"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"ejs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.0.0-tuxcare.0"},{"fixed":"1.0.0-tuxcare.1"}]}],"versions":["1.0.0"],"bundled":5},{"source":"osv","ecosystem":"TuxCare:npm","package":"ejs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.7.4-tuxcare.0"},{"fixed":"2.7.4-tuxcare.1"}]}],"versions":["2.7.4"],"bundled":2},{"source":"osv","ecosystem":"Debian:12","package":"node-ejs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.7-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"node-ejs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.7-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"node-ejs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.7-1"}]}]},{"source":"osv","ecosystem":"npm","package":"ejs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.1.7"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/ejs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.4-root.io.1"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"ejs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.4-aikido.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"node-ejs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.2-1","2.5.7-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"node-ejs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.7-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-ejs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.7-3","3.1.6-2"]}],"products":[{"vendor":"ejs","product":"ejs"}],"references":[{"url":"https://github.com/mde/ejs/releases","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","package","web"]},{"url":"https://eslam.io/posts/ejs-server-side-template-injection-rce/","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","web","report"]},{"url":"https://security.netapp.com/advisory/ntap-20220804-0001/","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29078","tags":["advisory"]},{"url":"https://github.com/mde/ejs/commit/15ee698583c98dadc456639d6245580d17a24baf","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-phwq-j96m-2c2q"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29078.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-29078","tags":["advisory"]},{"url":"https://eslam.io/posts/ejs-server-side-template-injection-rce","tags":["web"]},{"url":"https://github.com/mde/ejs","tags":["package"]},{"url":"https://security.netapp.com/advisory/ntap-20220804-0001","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2022-29078","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-29078","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2022-29078","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).","status":"published","published":"2022-04-25T14:13:32Z","modified":"2024-08-03T06:10:58.967Z","updated_at":"2026-11-02T14:34:36.578327Z"}],"euvd":[{"id":"EUVD-2022-1801","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).","status":"published","published":"2022-04-25T14:13:32Z","modified":"2024-08-03T06:10:58Z","updated_at":"2026-11-03T03:25:39.28463Z"}],"ghsa":[{"id":"GHSA-phwq-j96m-2c2q","title":"ejs template injection vulnerability","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).","status":"published","published":"2022-04-26T00:00:40Z","modified":"2023-01-30T05:02:57Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-74"],"updated_at":"2026-11-02T14:36:27.500048Z"}],"nvd":[{"id":"CVE-2022-29078","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).","status":"published","published":"2022-04-25T15:15:49.887Z","modified":"2026-06-17T04:39:32.44Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:07:18.660414Z"}],"osv":[{"id":"DEBIAN-CVE-2022-29078","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).","status":"published","published":"2022-04-25T15:15:49.887Z","modified":"2026-11-03T08:04:07.175332675Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-03T08:23:07.763774Z"},{"id":"GHSA-phwq-j96m-2c2q","title":"ejs template injection vulnerability","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).","status":"published","published":"2022-04-26T00:00:40Z","modified":"2023-11-08T04:09:07.883219Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-74"],"updated_at":"2026-11-02T15:46:53.244788Z"},{"id":"UBUNTU-CVE-2022-29078","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).","status":"published","published":"2022-04-25T15:15:00Z","modified":"2025-10-24T04:53:38Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T16:53:53.899276Z"},{"id":"CLSA-2026-1774570929","title":"TuxCare security update for ejs (5 CVEs)","description":"TuxCare rebuilt ejs to address 5 CVEs. Fixed in 1.0.0-tuxcare.1.","status":"published","published":"2026-08-04T14:52:15Z","modified":"2026-10-15T09:47:03.661053163Z","updated_at":"2026-11-02T15:43:43.621843Z"},{"id":"CLSA-2026-1774570931","title":"TuxCare security update for ejs (2 CVEs)","description":"TuxCare rebuilt ejs to address 2 CVEs. Fixed in 2.7.4-tuxcare.1.","status":"published","published":"2026-08-04T14:52:15Z","modified":"2026-10-15T09:47:05.276193584Z","updated_at":"2026-11-02T15:43:43.621843Z"},{"id":"CVE-2022-29078","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).","status":"published","published":"2022-04-25T14:13:32Z","modified":"2026-10-28T02:30:40.41136965Z","updated_at":"2026-11-02T15:44:25.164673Z"},{"id":"ROOT-APP-NPM-CVE-2022-29078","title":"CVE-2022-29078 in @rootio/ejs - Patched by Root","description":"Root has patched CVE-2022-29078 in the @rootio/ejs package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-07-16T06:14:01Z","modified":"2026-07-16T13:00:25.894729588Z","updated_at":"2026-11-02T15:53:27.362922Z"}]}}
