CVE-2022-29078
CVE-2022-29078 is a critical-severity vulnerability in Ejs with a CVSS 3.x base score of 9.8. Its EPSS exploit-prediction score of 32% places it in the 98th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-94.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- CVSS v2: 7.5
- EPSS exploit prediction: 32% (98th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-94
- Affected product: Ejs
- Published:
- Last modified:
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).
Frequently asked questions
- What is 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]. This is parsed as an internal option, and overwrites the outputFunctionName option with an arbitrary OS command (which is executed upon template compilation).
- How severe is CVE-2022-29078?
- CVE-2022-29078 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2022-29078 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 32% (98th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2022-29078?
- CVE-2022-29078 affects Ejs. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2022-29078?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- When was CVE-2022-29078 published?
- CVE-2022-29078 was published on 2022-04-25 and last updated on 2026-06-17.
References
- https://eslam.io/posts/ejs-server-side-template-injection-rce/
- https://github.com/mde/ejs/releases
- https://security.netapp.com/advisory/ntap-20220804-0001/
Affected products (1)
- cpe:2.3:a:ejs:ejs:3.1.6:*:*:*:*:node.js:*:*
More vulnerabilities in Ejs
- CVE-2023-29827 — Critical (CVSS 9.8): ejs v3.1.9 is vulnerable to server-side template injection. If the ejs file is controllable, template injection can be…
- CVE-2017-1000228 — Critical (CVSS 9.8): nodejs ejs versions older than 2.5.3 is vulnerable to remote code execution due to weak input validation in…
- CVE-2017-1000189 — High (CVSS 7.5): nodejs ejs version older than 2.5.5 is vulnerable to a denial-of-service due to weak input validation in the…
- CVE-2017-1000188 — Medium (CVSS 6.1): nodejs ejs version older than 2.5.5 is vulnerable to a Cross-site-scripting in the ejs.renderFile() resulting in code…
Other CWE-94 (Code Injection) vulnerabilities
- CVE-2026-57624 — Critical (CVSS 10.0): Unauthenticated Remote Code Execution (RCE) in Blocksy Companion Pro <= 2.1.46 versions.
- CVE-2026-10134 — Critical (CVSS 10.0): IBM Langflow OSS 1.0.0 through 1.9.3 allows an attacker to read every secret available to the Langflow process, read…
- CVE-2026-53576 — Critical (CVSS 10.0): Kestra is an open-source, event-driven orchestration platform. Prior to 1.0.45 and 1.3.21, the authentication filter…
- CVE-2026-10561 — Critical (CVSS 10.0): IBM Langflow OSS 1.0.0 through 1.9.3 has an vulnerability due to an improper isolation of Python execution combined…
- CVE-2026-25470 — Critical (CVSS 10.0): Improper Control of Generation of Code ('Code Injection') vulnerability in ACPT ACPT (Pro) - Custom Post Types Plugin…
- CVE-2026-48836 — Critical (CVSS 10.0): Unauthenticated Remote Code Execution (RCE) in Easy Invoice <= 2.1.19 versions.