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, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub 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-1vulnerable
bullseye2.5.7-3vulnerable
bookworm, sid3.1.8+~3.1.1-1fixed

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
node-ejssourcestretch(unfixed)end-of-life
node-ejssource(unstable)3.1.7-11010359

Notes

[bullseye] - node-ejs <no-dsa> (Minor issue; can be fixed via point release)
[buster] - node-ejs <no-dsa> (Minor issue; can be fixed via point release)
[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