Vulnerabilities / CVE-2022-29078

critical

CVE-2022-29078

ejs: server-side template injection in outputFunctionName

Published Modified CWE 94
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, GHSA. Rated lower by Red Hat (high).

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 packages and fixed versions

SourcePackageFixed in
npm::GitHub Security Advisory npmejs3.1.7
debian 10node-ejs2.5.7-1+deb10u1
debian 11node-ejs2.5.7-3+deb11u1
debian 12node-ejs3.1.7-1
debian 13node-ejs3.1.7-1
debian 14node-ejs3.1.7-1
debian 9node-ejsno fix listed
echonode-ejs3.1.7-1
Red Hatpcs, pcs-snmpno fix listed
Show all 10 entries from 9 sources
SourcePackageFixed in
npm::GitHub Security Advisory npmejs3.1.7
debian 10node-ejs2.5.7-1+deb10u1
debian 11node-ejs2.5.7-3+deb11u1
debian 12node-ejs3.1.7-1
debian 13node-ejs3.1.7-1
debian 14node-ejs3.1.7-1
debian 9node-ejsno fix listed
echonode-ejs3.1.7-1
Red Hatpcsno fix listed
Red Hatpcs-snmpno fix listed

References

All 10 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.