CVE-2022-29078
The ejs (aka Embedded JavaScript templates) package 3.1.6 for Node.js allows server-side template injection in settings[view options][outputFunctionName]....
- Published
- Apr 25, 2022
- Updated
- Aug 3, 2024
- Assigning CNA
- mitre
- Evidence observed
- Aug 8, 2026
Primary CVSS
nvd · CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HModerate · next 30 days
- Percentile
- 98.3%
- Model date
- Sep 21, 2026
EPSS is a statistical estimate, not a certainty or a measure of impact. Combine it with CVSS, KEV status, exposure and your environment.
Summary
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).
Sources
7Docker-based PoC for CVE-2022-29078: EJS SSTI leading to unauthenticated remote code execution via outputFunctionName injection. Includes reproduction steps and two mitigation strategies.
Proof-of-concept exploit for CVE-2022-29078 (ejs 3.1.6) enabling remote command execution via a Python script. Accepts a target URL and provides an interactive shell.
- npm-demoPoC
Browser demo: EJS template injection (CVE-2022-29078) with Seal Security remediation
Responsible use
Use vulnerability information only on systems you own or are authorized to test. Kitploit links to public research metadata and does not store exploit code or malicious payloads.