Skip to content
Heist/ feed
Back to feed
Unrated

Security advisory

Type: advisorySources: OSVCVE: CVE-2022-29078

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

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-29078
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 23:17 UTC · Revision 1

Source evidence

CVE-2022-29078

core-osv · Original source

Published 25 Apr 2022, 14:13 UTC

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

osv:CVE-2022-29078
Complete source record
{
  "id": "00e5494ceb553bc911c26e3bbf0f1a280ab8f8d78984b435c9e6760fa0ffa308",
  "url": "https://osv.dev/vulnerability/CVE-2022-29078",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2022-29078",
    "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).",
    "evidence": "osv:CVE-2022-29078",
    "products": [],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-29078",
      "aliases": [
        "CVE-2022-29078",
        "GHSA-phwq-j96m-2c2q"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/mde/ejs",
              "type": "GIT",
              "events": [
                {
                  "introduced": "80bf3d7dcc20dffa38686a58b4e0ba70d5cac8a1"
                },
                {
                  "last_affected": "80bf3d7dcc20dffa38686a58b4e0ba70d5cac8a1"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:ejs:ejs:3.1.6:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "3.1.6"
                      },
                      {
                        "last_affected": "3.1.6"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.1.6",
            "v3.1.6"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-29078.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:40.411369650Z",
      "provider": "osv",
      "references": [
        "https://eslam.io/posts/ejs-server-side-template-injection-rce/",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29078.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-29078",
        "https://security.netapp.com/advisory/ntap-20220804-0001/",
        "https://github.com/mde/ejs/releases"
      ],
      "provider_metadata": {
        "cna_assigner": "mitre",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29078.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-29078",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 507918,
  "published_at": "2022-04-25T14:13:32+00:00"
}