Skip to content
Heist/ feed
Back to feed
CriticalFix available

node-ejs — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-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
node-ejs
Affected versions
Not specified
Fixed versions
3.1.7-1
CVEs
CVE-2022-29078
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 15:30 UTC · Revision 1

Source evidence

DEBIAN-CVE-2022-29078

core-osv · Original source

Published 25 Apr 2022, 15:15 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:DEBIAN-CVE-2022-29078

node-ejs

Fixed versions: 3.1.7-1

node-ejs

Fixed versions: 3.1.7-1

node-ejs

Fixed versions: 3.1.7-1

Complete source record
{
  "id": "7136a78a6997307dc15349b25f775be3e9fbb8edfba06f61c2a068e3d3088a1b",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-29078",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-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:DEBIAN-CVE-2022-29078",
    "products": [
      {
        "name": {
          "value": "node-ejs",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.1.7-1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "node-ejs",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.1.7-1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "node-ejs",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.1.7-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "DEBIAN-CVE-2022-29078",
      "aliases": [
        "DEBIAN-CVE-2022-29078"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.1.7-1"
                }
              ]
            }
          ],
          "package": {
            "name": "node-ejs",
            "purl": "pkg:deb/debian/node-ejs?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-29078.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.1.7-1"
                }
              ]
            }
          ],
          "package": {
            "name": "node-ejs",
            "purl": "pkg:deb/debian/node-ejs?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-29078.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.1.7-1"
                }
              ]
            }
          ],
          "package": {
            "name": "node-ejs",
            "purl": "pkg:deb/debian/node-ejs?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-29078.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-15T08:03:04.428528846Z",
      "provider": "osv",
      "upstream": [
        "CVE-2022-29078"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2022-29078"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2022-29078",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 325058,
  "published_at": "2022-04-25T15:15:49.887+00:00"
}