{"id":"CVE-2022-29078","published":"2022-04-25T14:13:32Z","modified":"2024-08-03T06:10:58Z","title":"The ejs (aka Embedded JavaScript templates) package 3.1.6 for Node.js allows server-side template injection in…","vendor":null,"product":null,"tier":"core","eol":null,"description":{"text":"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).","provenance":"source","from":"CVE.org"},"summary":{"text":"The ejs (Embedded JavaScript templates) package version 3.1.6 for Node.js contains a server-side template injection flaw in the settings[view options][outputFunctionName] option, which is parsed as an internal option. An attacker who can control this option can overwrite outputFunctionName with an arbitrary operating system command, which is then executed when the template is compiled.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-02T16:41:29Z"},"cvss":null,"epss":{"score":0.32808,"percentile":0.98375,"date":"2026-11-24","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2024-09-18","exploitedFirstSeen":"2024-09-18","ransomware":false,"evidence":[{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?host_type=src&vulnerability=cve-2022-29078","date":"2024-09-18"}],"evidenceTotal":1,"provenance":"source"},"exploited":true,"otx":{"pulseCount":2,"pulses":[{"name":"Killing The Bear - Vulnerabilities Cisa Summary Apr 25th  (2022-05-03)","url":"https://otx.alienvault.com/pulse/6271815d5b43a4e4c1dbdd72","created":"2022-05-03"},{"name":"Node.js Multiple Vulnerabilities","url":"https://otx.alienvault.com/pulse/626fbee68a3330b0d6033b5d","created":"2022-05-02"}],"provenance":"machine"},"cwes":[],"references":[{"url":"https://github.com/mde/ejs/releases","tags":["x_refsource_MISC"]},{"url":"https://eslam.io/posts/ejs-server-side-template-injection-rce/","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20220804-0001/","tags":["x_refsource_CONFIRM"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"npm","package":"ejs","vulnerableRanges":["<3.1.7"],"patched":["3.1.7"],"from":["GHSA-phwq-j96m-2c2q"],"provenance":"source"}],"advisories":[{"id":"GHSA-phwq-j96m-2c2q","url":"https://github.com/advisories/GHSA-phwq-j96m-2c2q","severity":"CRITICAL","ecosystem":"npm","package":"ejs","vulnerableRanges":["<3.1.7"],"patched":["3.1.7"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2022-1801","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-1801","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":6,"skipped":3,"earliest":"2022-07-20","earliestUrl":"https://github.com/miko550/CVE-2022-29078","repos":[{"name":"miko550/CVE-2022-29078","url":"https://github.com/miko550/CVE-2022-29078","stars":8,"created":"2022-07-20"},{"name":"l0n3m4n/CVE-2022-29078","url":"https://github.com/l0n3m4n/CVE-2022-29078","stars":3,"created":"2024-11-05"},{"name":"chuckdu21/CVE-2022-29078","url":"https://github.com/chuckdu21/CVE-2022-29078","stars":0,"created":"2025-01-07"},{"name":"AlonNavon/npm-demo","url":"https://github.com/AlonNavon/npm-demo","stars":0,"created":"2026-02-15"},{"name":"test-avm-714877d2df585126/vuln-ejs-critical","url":"https://github.com/test-avm-714877d2df585126/vuln-ejs-critical","stars":0,"created":"2026-06-24"}]},"nuclei":[{"id":"CVE-2022-29078","name":"Node.js Embedded JavaScript 3.1.6 - Template Injection","severity":"critical","path":"http/cves/2022/CVE-2022-29078.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-29078.yaml"}],"first":{"date":"2022-07-20","source":"PoC-in-GitHub","url":"https://github.com/miko550/CVE-2022-29078"},"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2022-04-25","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2022-29078","provenance":"source"},{"date":"2022-07-20","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/miko550/CVE-2022-29078","provenance":"source"},{"date":"2024-09-18","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?host_type=src&vulnerability=cve-2022-29078","provenance":"source"}],"speed":{"daysToPublicExploit":86,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":60.8,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 797 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.68,"detail":"percentile 0.9838"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"6 PoC-in-GitHub repos; 1 nuclei template"},{"name":"Mentioned in OTX pulses","points":1.08,"detail":"2 pulses"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}