CVE-2022-29078
JSON

9.8critical

ejs template injection vulnerability

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
32.8% (higher than 98% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-phwq-j96m-2c2q

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).

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
ejs (npm)before 3.1.7GitHub Advisory Database
ejs ejs3.1.6NVD

All scores

GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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).

NVD (es)

El paquete ejs (también se conoce como plantillas JavaScript Insertadas) versión 3.1.6 para Node.js, permite una inyección de plantillas del lado del servidor en settings[view options][outputFunctionName]. Esto es analizado como una opción interna, y sobrescribe la opción outputFunctionName con un comando arbitrario del Sistema Operativo (que es ejecutada al compilar la plantilla)

References

Sources

SourceRecordLicence
CVE ListCVE-2022-29078 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-phwq-j96m-2c2q changed 2023-11-08CC-BY-4.0
NVDCVE-2022-29078 changed 2026-06-17Public domain