CVE-2022-29078

NameCVE-2022-29078
DescriptionThe 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).
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs1010359

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
node-ejs (PTS)stretch2.5.2-1vulnerable
buster2.5.7-1+deb10u1fixed
bullseye2.5.7-3+deb11u1fixed
bookworm3.1.8+~3.1.1-2fixed
sid, trixie3.1.10+~3.1.5-2fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
node-ejssourcestretch(unfixed)end-of-life
node-ejssourcebuster2.5.7-1+deb10u1
node-ejssourcebullseye2.5.7-3+deb11u1
node-ejssource(unstable)3.1.7-11010359

Notes

[stretch] - node-ejs <end-of-life> (Node not covered by security support)
https://eslam.io/posts/ejs-server-side-template-injection-rce/
https://github.com/mde/ejs/commit/15ee698583c98dadc456639d6245580d17a24baf (v3.1.7)

Search for package or bug name: Reporting problems