{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-29078","id":"CVE-2022-29078","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).","descriptionLong":"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:32.000Z","updated":"2026-10-28T02:30:40.411369650Z","reserved":"2022-04-12T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"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","rating":"critical","source":"NVD"},"metrics":[{"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","rating":"critical","source":"NVD"},{"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","rating":"critical","source":"GitHub"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","rating":"high","source":"NVD"}],"rating":"critical","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"status":"affected","version":"n/a"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"ejs","purl":"pkg:npm/ejs","ranges":["<3.1.7"],"fixed":["3.1.7"],"advisory":"GHSA-phwq-j96m-2c2q"}],"cwes":["CWE-94","CWE-74"],"aliases":["GHSA-phwq-j96m-2c2q"],"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"]},{"url":"https://security.netapp.com/advisory/ntap-20220804-0001/","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29078.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29078","tags":["advisory"]},{"url":"https://github.com/mde/ejs/commit/15ee698583c98dadc456639d6245580d17a24baf","tags":["web"]},{"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"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.32808,"epssPercentile":0.98385,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-29078","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29078","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-29078","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-phwq-j96m-2c2q","ok":true,"note":"GHSA-phwq-j96m-2c2q"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-29078","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":["EPSS 33% with CVSS 9.8"],"attention":null}