Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1waHdxLWo5Nm0tMmMycc1A-A

ejs template injection vulnerability

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

Permalink: https://github.com/advisories/GHSA-phwq-j96m-2c2q
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1waHdxLWo5Nm0tMmMycc1A-A
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: about 2 years ago
Updated: over 1 year ago


CVSS Score: 9.8
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Identifiers: GHSA-phwq-j96m-2c2q, CVE-2022-29078
References: Repository: https://github.com/mde/ejs
Blast Radius: 60.6

Affected Packages

npm:ejs
Dependent packages: 15,041
Dependent repositories: 1,532,080
Downloads: 60,219,664 last month
Affected Version Ranges: < 3.1.7
Fixed in: 3.1.7
All affected versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.1.0, 0.2.0, 0.2.1, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.8, 1.0.0, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.1, 2.4.2, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.5.6, 2.5.7, 2.5.8, 2.5.9, 2.6.1, 2.6.2, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 3.0.1, 3.0.2, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6
All unaffected versions: 3.1.7, 3.1.8, 3.1.9, 3.1.10