Skip to content
Fencer Vulns
critical 9.8

CVE-2022-29078 in the critical feed json

ejs template injection vulnerability

published 2022-04-25 4 y ago modified 2026-06-17 4 mo ago also GHSA-phwq-j96m-2c2q , EUVD-2022-1801

cvss
9.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
32.8%
EPSS 32.8% chance of exploitation in 30 days, percentile 98%
public exploits
0
none known, plus a Nuclei check

Summary

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

Patch / fix

  • npm ejs 3.1.7
  • node-ejs Debian 14, Debian 13, Debian 12 3.1.7-1

debian advisories DEBIAN-CVE-2022-29078

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-29078 updated cvss 9.8

ejs: server-side template injection in outputFunctionName

  • Red Hat Migration Toolkit for Containers rhmtc/openshift-migration-ui-rhel8 Red Hat Migration Toolkit for Virtualization migration-toolkit-virtualization/mtv-ui-rhel8 Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/console-rhel8, rhacm2/search-ui-rhel8, rhacm2/mcm-topology-rhel8, rhacm2/console-header-rhel8, rhacm2/kui-web-terminal-rhel8 Red Hat build of Apicurio Registry 2 ejs
    affected: no fix available
  • Red Hat Data Grid 8 ejs Red Hat Enterprise Linux 8 pcs, pcs-snmp
    affected: no fix planned “Will not fix”
  • Red Hat Integration Data Virtualisation Operator ejs Red Hat Integration Service Registry ejs
    affected: no fix planned “Out of support scope”
  • Red Hat Quay 3 quay/quay-rhel8
    affected: no fix available
  • Red Hat OpenShift Service Mesh 2.1 openshift-service-mesh/kiali-rhel8 Red Hat A-MQ Online ejs Red Hat Integration Camel K 1 ejs Red Hat Integration Camel Quarkus 1 ejs Red Hat OpenShift distributed tracing 2 rhosdt/jaeger-agent-rhel8, rhosdt/jaeger-query-rhel8, rhosdt/jaeger-ingester-rhel8, rhosdt/jaeger-collector-rhel8, rhosdt/jaeger-all-in-one-rhel8, rhosdt/jaeger-es-rollover-rhel8, +1 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

32.81% chance of exploitation in the next 30 days, higher than 98% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • Nuclei template Node.js Embedded JavaScript 3.1.6 - Template Injection nuclei detection template
  • eslam.io https://eslam.io/posts/ejs-server-side-template-injection-rce/ referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
npm ejs
<3.1.7
3.1.7

Classification

Weakness
  • CWE-94 Improper Control of Generation of Code
  • CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.