9.8
CRITICAL
CVE-2022-29078
EJS Template Injection in Node.js - Server-Side Command Execution
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).

INFO

Published Date :

April 25, 2022, 3:15 p.m.

Last Modified :

Aug. 8, 2023, 2:22 p.m.

Remotely Exploitable :

Yes !

Impact Score :

5.9

Exploitability Score :

3.9
Public PoC/Exploit Available at Github

CVE-2022-29078 has a 33 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

Affected Products

The following products are affected by CVE-2022-29078 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Ejs ejs
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2022-29078.

URL Resource
https://eslam.io/posts/ejs-server-side-template-injection-rce/ Exploit Patch Third Party Advisory
https://github.com/mde/ejs/releases Release Notes Third Party Advisory
https://security.netapp.com/advisory/ntap-20220804-0001/ Third Party Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Serverside Template Injection (SSTI) RCE - THM challenge "whiterose"

ctf exploit ssti tryhackme web-pentesting

Python

Updated: 2 weeks, 1 day ago
0 stars 0 fork 0 watcher
Born at : Nov. 5, 2024, 6:15 a.m. This repo has been linked 1 different CVEs too.

Cloned from Carmine

Dockerfile HCL JavaScript EJS

Updated: 2 weeks, 2 days ago
0 stars 0 fork 0 watcher
Born at : Nov. 4, 2024, 10:26 p.m. This repo has been linked 1 different CVEs too.

None

Dockerfile HCL JavaScript EJS

Updated: 3 weeks, 2 days ago
0 stars 0 fork 0 watcher
Born at : Oct. 28, 2024, 1:06 p.m. This repo has been linked 1 different CVEs too.

DsoD paris demo material

Dockerfile JavaScript EJS

Updated: 4 weeks, 2 days ago
0 stars 0 fork 0 watcher
Born at : Oct. 24, 2024, 12:42 p.m. This repo has been linked 1 different CVEs too.

None

Dockerfile HCL JavaScript EJS

Updated: 1 month ago
0 stars 0 fork 0 watcher
Born at : Oct. 20, 2024, 4:58 a.m. This repo has been linked 1 different CVEs too.

None

Dockerfile HCL JavaScript EJS

Updated: 1 month ago
0 stars 0 fork 0 watcher
Born at : Oct. 18, 2024, 9:06 a.m. This repo has been linked 1 different CVEs too.

None

Dockerfile HCL JavaScript EJS

Updated: 1 month, 1 week ago
0 stars 0 fork 0 watcher
Born at : Oct. 10, 2024, 1:40 p.m. This repo has been linked 1 different CVEs too.

None

Dockerfile HCL JavaScript EJS

Updated: 1 month, 1 week ago
0 stars 0 fork 0 watcher
Born at : Oct. 10, 2024, 1:17 p.m. This repo has been linked 1 different CVEs too.

None

Dockerfile HCL JavaScript EJS

Updated: 1 month, 1 week ago
0 stars 0 fork 0 watcher
Born at : Oct. 10, 2024, 1:08 p.m. This repo has been linked 1 different CVEs too.

None

Dockerfile HCL JavaScript EJS

Updated: 1 month, 1 week ago
0 stars 0 fork 0 watcher
Born at : Oct. 10, 2024, 3:51 a.m. This repo has been linked 1 different CVEs too.

None

Dockerfile HCL JavaScript EJS

Updated: 1 month, 1 week ago
0 stars 1 fork 1 watcher
Born at : Oct. 10, 2024, 3:35 a.m. This repo has been linked 1 different CVEs too.

None

Dockerfile JavaScript EJS

Updated: 3 months, 2 weeks ago
0 stars 0 fork 0 watcher
Born at : Aug. 7, 2024, 11:37 p.m. This repo has been linked 1 different CVEs too.

None

JavaScript CSS EJS

Updated: 4 months, 1 week ago
0 stars 0 fork 0 watcher
Born at : July 1, 2024, 3:08 a.m. This repo has been linked 1 different CVEs too.

None

Dockerfile JavaScript EJS

Updated: 5 months, 1 week ago
0 stars 1 fork 1 watcher
Born at : June 12, 2024, 9:50 a.m. This repo has been linked 1 different CVEs too.

None

Dockerfile HCL JavaScript EJS

Updated: 3 months, 2 weeks ago
0 stars 0 fork 0 watcher
Born at : May 30, 2024, 2:17 p.m. This repo has been linked 1 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2022-29078 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2022-29078 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CWE Remap by [email protected]

    Aug. 08, 2023

    Action Type Old Value New Value
    Changed CWE CWE-74 CWE-94
  • Modified Analysis by [email protected]

    Nov. 09, 2022

    Action Type Old Value New Value
    Changed Reference Type https://security.netapp.com/advisory/ntap-20220804-0001/ No Types Assigned https://security.netapp.com/advisory/ntap-20220804-0001/ Third Party Advisory
  • CVE Modified by [email protected]

    Aug. 04, 2022

    Action Type Old Value New Value
    Added Reference https://security.netapp.com/advisory/ntap-20220804-0001/ [No Types Assigned]
  • Initial Analysis by [email protected]

    May. 05, 2022

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:N/C:P/I:P/A:P)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://eslam.io/posts/ejs-server-side-template-injection-rce/ No Types Assigned https://eslam.io/posts/ejs-server-side-template-injection-rce/ Exploit, Patch, Third Party Advisory
    Changed Reference Type https://github.com/mde/ejs/releases No Types Assigned https://github.com/mde/ejs/releases Release Notes, Third Party Advisory
    Added CWE NIST CWE-74
    Added CPE Configuration OR *cpe:2.3:a:ejs:ejs:3.1.6:*:*:*:*:node.js:*:*
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2022-29078 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2022-29078 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

41.25 }} 8.98%

score

0.97405

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability